Set up local development correctly see my answer here, even for local development have correct folder structure. https://laracasts.com/discuss/channels/laravel/upload-laravel-55-to-shared-hosting
laravel project not running on xampp
my laravel project is not running on my localhost xampp if i put the address "localhost/myapp/public" i get the main page but when i write my other route like "localhost/myapp/public/other" it show me Sorry, the page you are looking for could not be found.how to solve this for xampp. on laravel own application server all routes are accessible fine.
i'm on window and i not get what that answer say's can you tell me here the solution please.
Yes solution, the link in that answer has a guide to properly setup laravel. That guide works on shared hosting and in development in xampp and wamp as well.
folder structure
https://imgur.com/C5SHtP9 Laravel up above htdocs
https://imgur.com/FA9vnqG part in htdocs
https://imgur.com/3oP1GrG asset
asset example
<img src="<?php echo asset('assets/upload/imgdogs') . '/' . $row->dogpic; ?>" alt="" class="image">
but i didn't found where this folder is which is in the answer in my project
I suggest you to use docker or vagrant.
@hidayat3676 the guide are example folder names, you use your names.
what is not working, show code,
Route, controller, view
At least throw us a bone.
laravel project not running on xampp
i get the main page
That means laravel is working on xampp.
Laravel doesn't come with an .htacess file out of the box and XAMPP uses Apache so you need one, you have to create one in the root folder
See the Configuration docs here for the contents of the file https://laravel.com/docs/5.0/configuration#pretty-urls
@calder12 ver 5.6 doesn't include an htaccess file, 5.5 did.
hi @hidayat3676 I use xampp and mamp (on windows 10) almost every day and it's working perfectly with or without virtual host... So can you show the code for your route (and/or controller if you used one) and the path/filename.blade.php to your view ?
@jlrdw ah, I didn't realize that, I don't see that he mentioned the version he's running, and given he gets his main page but no other routes I still feel the .htaccess is the issue.
Honestly XAMPP is useless as far as I'm concerned, Homestead or Windows Linux Subsystem are far superior solutions, and Homestead just makes this a non-issue entirely.
@calder12 I don't know version OP is using. I have ver 5.5. I was asking you, does ver 5.6 now not come with an out of the box htaccess?
Sure 5.6 comes with .htaccess and is easy to check. Just look at the repo.
FYI, I never changed or created any .htaccess file with xampp, ampps, mamp etc on windows 10, with Laravel 5.4 5.5 5.6, and never got any problem
@KNietzsche I have never had problems neither. I set up all following @Snapey guide
http://novate.co.uk/deploy-laravel-5-on-shared-hosting-from-heart-internet
I setup development and shared host that way, never had an asset, session, or some of these other problems I see floating around on the forum.
I beg people to
Follow the guide, it works.
Oh I make one change in htaccess:
RewriteBase /whatever_here/
@Cronix ah, so it does. Never mind :)
@Cronix is your picture current, or like me and Snapey is it from 30 years ago?
Last summer
So you are still a young man, hehe
@jlrdw cheeky. I'll have you know that picture is from no more than 15 years ago.
Xampp is running apache
You need to set the document root to be the project public folder.
there are loads of tutorials on this.
eg https://stackoverflow.com/questions/10157333/xampp-change-document-root
Please or to participate in this conversation.