Laravel development with LBF

Anybody is using Local by Flywheel for Laravel development?

Hi @ckissi,

There are a handful at the moment :slight_smile:

Check out https://local.getflywheel.com/community/search?q=laravel

Hi ckissi. Did you ever get Laravel up and running on Local? None of the articles linked to here https://local.getflywheel.com/community/search?q=laravel8 explain any solution, not that I could find.

@vayu, I’m still on MAMP PRO (starting to hate it because it came really unstable). Planning to buy new imac and use LBF and valet combination there.

So you have tried to use LBF for Laravel and it didn’t work?

@ckissi yes, I did try, but could not make it for some reason. I think It was to do with the database, but am ont sure. Please do let me know if you get it up and running. Would really like to fix this.

@vayu, @ckissi,

I tested this earlier and here’s what I did:

  • Used app as the Laravel project folder. This is also what contains Laravel’s public folder
  • Create a .env file for Laravel that matches the Local site domain
  • Run php artisan key:generate
  • Run php artisan config:cache

Also, if you’re running the Preferred environment then make sure you enable “Dev Mode” in the top right of the site info.

Let me know if you guys get stuck after trying that.

@vayu Forgot… are you on mac or win?

Thanks @clay. I tried it, but just get an error:
(1/1) InvalidArgumentException
View [welcome] not found.

@ckissi I am on a mac.

@vayu

Try running php artisan config:clear again and then do a hard refresh in your browser.

Thanks @clay, I had already tried that, but no luck. I tried it again, but it’s the same problem. :slight_smile:

Make sure all of the paths are correct in the appropriate configs. As far as what to put in them, you’ll want what the container sees, if I remember correctly. So something like /app. Then you can clear the cache again.

Other than that, I’m not sure what would be going on. My Laravel experience is pretty limited :slight_smile:

I’ve just tried to install it via composer and it worked fine. Everything should be located in the app folder. Also, check the storage folder permissions and set them to 777

Thanks again! So what other config files are there other than .env? I have tried to edit /app/app/config/app.php too. Where would I write something like /app?
After creating a site with Local, I cd into the app folder and run: laravel new. Then I followed your instructions above.
Unfortunately my Laravel experience is limited too, but want to get start learning. Just gotta setup an environment first. :slight_smile:

There must be some issue with the directory structure. Your laravel application have to be placed into : Local Sites/Youdomain/app. This is the root for your project, not the document root for the web.

Document root for the web is : Local Sites/Youdomain/app/public

So your entire Laravel installation have to be placed in: Local Sites/Youdomain/app/ and you app.php should be located here:
Local Sites/Youdomain/app/config/app.php

laravels “config” folder is on the same level as laravels “app” folder.

That’s exactly what I have. Please see attachment. Is there some other configuration that I am missing? I’m really sorry for being so difficult. :slight_smile:


Here is a screenshot of my .env file.

Please attach the screenshot of the error page

Thanks for helping! Here is part of it.

Try to look into the /Users/vayurobins/Sites/laravellocal/app/resources/views/ if the welcome.blade.php view is really there.
If so check the file permissions. If thats ok, try to go to the storage folder and look for compiled views. Remove all the compiled views from there manually. Should be in the storage/framework/views folder

welcome.blade.php is ok.
Permissions are ok.
There are no compiled views.

No idea, I would probably start from scratch, create new host and then new install, maybe something just simply got wrong.