laravel 5.8 routes not working in xampp after update? - laravel-5

i have a pc and desktop, they both used to have xampp and laravel 5.7, recently i updated laravel to 5.8 in my desktop and reset laptop and install laravel 5.8,, routes are working all fine in desktop laravel version ,, but in newly installed laravel in laptop they aren't working, i get 404 error except '/' i tried override all, ifmodule solution they are all fine it is not working in newly installed laravel 5.8 please help ...
PS : i also created seprate project in desktop and laptop ,, not copy paste but individually created in both of them..
i checked apache hhtp.config for ifmodule and overrride and htaccess is default i haven't modified any and is same as all them in solution
i want to be able to use routes without using php artisan serve

Check the configuration of the Directory section in the vhost settings of xampp.

Related

Defining Custom URL in MacBook for laravel

I just migrated from a windows based laptop to a macbook.
I'm pretty new to MacOS
I'm developing a laravel project in my mac and I want to access the url through custom domain using virtual host such as mylaravel.com or something else, i'm not using xampp, only php, and composer.
for example:
currently I access my laravel project through:
sudo php artisan serve --port=80
and this is the url to access my
localhost
what I want is the following url:
mylaravel.id
How can I achieve it?
Thank you.
you can use laravel valet.
look at this documentation.

Laravel 5.3 run on Centos 7 (cpanel) with cloudflare. The post form is not submitted to laravel project code

I had experience in setting up linux ubuntu server with apache2. the laravel project is run successfully and everything works accordingly. the same code I applied in centos apache2 and it failed.
eg:
simple login post form using html laravel blade is not submited to the backend laravel code when the button is clicked.
no idea what is going on.
it just redirects to the same login page even the correct crediential is entered correctly.
according to the networking showing in google chorme debugging tools.
The Laravel project is within this directory
/home/abccom/public_html/abc/public
laravel 5.3
Centos 7
Apache/2.4.46 (cPanel)
Cloudflare
anyone can help??

Deployed Laravel project not running

I have a Laravel project working fine in Localhost. After deploying it to a shared hosting server I am getting "prettyPrint is not defined" error. Can someone help me identify the problem. PHP version on server is 7.1. Laravel 5.8 and using jeroennoten/Laravel-AdminLTE
Problem was .htaccess file. Replacing file solved the problem.

Laravel not working on remote server only test echo working

I am newbie to Laravel and first time setup the laravel app on remote server, I install laravel and configure with domain name by apache config but I am getting blank page on hitting url, For test I just echo test on public/index.php and its showing correctly but welcome page doesn't work, I don't know where I am making mistake.
This is fresh laravel app I have install directly on server
The question was vague.
Have you configure the route.php to your view welcome.blade.php

Laravel version: 5.4.28 api routes not working on localhost

I downloaded Laravel 5.4.28 and created one api route. Nothing works on localhost. I am using XAMPP on Windows 8.1 as local development.
But everything is working fine on server. I also notice one strange thing. It will work on localhost if I create virtual host on localhost. like below.
php artisan serve
Is that true? or Am I missing anything?
My api routes are like this...
http://localhost:1234/adminapi/public/api/v1/authenticateuser
If your XAMPP works normally with normal PHP pages, did you check which version of php XAMPP uses ? the minimum required version is
PHP >= 5.6.4
Laravel Official Website
The default version of XAMPP's PHP framework is 5.6.30
I have faced the same problem, it turned out that I had only problem with PHP version I just upgraded the version of php.ini from 5.6.3 to 7.0.1 new versions of XAMPP have them both !
First of all you need to create virtual host for your project like yourprojectname.local. and test your app through this url.If you not create virtualhost then you need to give whole path for access laravel api like localhost/yourprojectdirectory/public/adminapi/public/api/v1/authenticateuser
You can bellow link refer to the creating virtual host
http://foundationphp.com/tutorials/apache_vhosts.php
OR
How To Set Up Apache Virtual Hosts on XAMPP (Windows)
When you do php artisan serve and load the URL returned by that command do you see laravels welcome page? If not then you haven't installed it correctly. https://laravel.com/docs/5.4
The php artisan serve command doesn't create a virtual host, it is just a shortcut for the PHP Builtin Webserver, something PHP has out of the box, so the point of using it is to start testing your application as fast as you could, you just need to install PHP, Composer and your application is up (if you don't need anything else, of course). But if you already have Nginx installed, there is no point at all, just use it.
It's not wise to use the Builtin Webserver in production.
There's a property in config/app.php called url.
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
|
*/
'url' => env('APP_URL', 'http://localhost'),
By default it links to .env file's property called APP_URL. XAMP usually requires you to navigate to localhost/project_folder before you can even access your project, hence why you need to set your url property to the one you're using.
Second, API routes usually are prefixed with /api/ and do require a X-REQUESTED-WITH: XMLHttpRequest header.
If you install fresh laravel app, you base api prefix must be equal api.
you route in api.php
Route::get('test', 'TestController#test');
If now you run php artisan serve command, api will be available to
localhost:8000/api/test.
Hope, I help you.
I was facing the same with Apache on Windows. Following the next steps below, it worked for me.
First, look for your file httpd.conf into Apache.
Find the section...
<Directory /var/www/>
Change
AllowOverride None
to
AllowOverride All
Finally, restart the Apache service.

Resources