No docker-compose.yml when installing Laravel project - laravel

env: macOS 12.6.3
Docker, Composer, PHP installed
Hello, I’m wondering if you have to manually install sail using
php artisan sail:install
every time I create projects.
Although I have installed laravel projects several times successfully, now it says “no configuration file provided: not found” when sail up when installing a new project and sail up. And there’s no docker-compose.yml file.
The question is that I need to manually install sail every time I make Laravel projects despite the fact that it did automatically installed sail before.
Thank you.
I have tried
php artisan sail:install

Related

Deploy laravel from github to heroku gives error" In order to use the Auth::routes() method, please install the laravel/ui package"

I uploaded a laravel app working fine locally on github and deployed on heroku. but I kept Getting this error when deployed on heroku. view Error Image
I tried these cmds on heroku console
composer install
composer require laravel/ui
php artisan ui bootstrap --auth
but when ever I enter "php artisan ui bootstrap --auth" it says artisan not a directory or not found but its there.
I have tried "composer dump-autoload" as well, still same..
pls help
You can't install things interactively on Heroku. At best, it will appear to work temporarily but get reverted within 24 hours. All dependencies must be declared so Heroku can install them at build time.
Run composer require laravel/ui locally, then commit your updated composer.json and composer.lock files and redeploy.

When moving a Laravel repo to a new development environment, how can I get the tests running again?

I had developed a Laravel repo in WSL (Windows), and everything was fine.
Later, I bought a laptop with Ubuntu on it and wanted that to be my main development machine. So I downloaded my repo, copied over my various .env files, and set up the MySQL database with the appropriate schemas and users.
But my PHPUnit tests still wouldn't work.
And I was struggling to figure out from the Laravel docs what steps I'd missed.
These were the commands that I needed to run:
php artisan migrate --env=testing
php artisan db:seed --env=testing
Then ./vendor/phpunit/phpunit/phpunit tests/Feature/ worked fine.
P.S. php artisan migrate:refresh --seed --env=testing is also useful to know about.

Downloaded laravel project hangs on preloader when deployed on localhost

I'm trying to deploy a laravel project I have received onto my localhost but it hangs on the loading page and doesn't load the site.
I received the source code of a laravel project that was coded for me.
The deployed website on the shared hosting works properly, and I can also manipulate the files through my ftp access.
However, I'm trying to deploy the project on my localhost (as well as to migrate to a different shared hosting service).
I tried loading the server on wamp, homestead and with artisan serve, but all methods end up the same - the index.php seems to be loading, but is stuck eternally on the preloading .gif file and doesn't present the site.
the browser debugger is throwing a lot of javascript errors (see attached image)
I assume a have a config problem, but I can't locate it and I am unsure how to even locate & debug the issue.
I tried following these configuration steps:
1. changed .htaccess to generic laravel .htaccess (deleted cpanel related lines)
2. changed the .env to fit my wamp db / homestead db
3. composer install
4. composer update
5. php artisan key:generate
6. php artisan cache:clear
7. php artisan migrate
I also installed laravel-debugbar but it hasn't helped me out of the box, and I'm unsure where I need to try to catch the problem.
If anyone can give me pointers on how to understand my problem better, I would be very thankful.
Thanks in advance!
laravel bug
Double check your .env if all details are correct
Set APP_DEBUG=true in your .env file
Double check if your database exist and have data if you are using a database
Check if your host is added to /etc/hosts
Check if your host is added to apache/nginx config correctly
Try running these commands:
$ rm composer.lock package-lock.json
$ composer install
$ npm install
$ npm run dev
$ php artisan clear-compiled
$ php artisan optimize:clear
$ php artisan package:discover
$ php artisan storage:link
$ php artisan migrate:fresh && php artisan db:seed // optional!
Then clear browser cache to be safe.
Open web inspector to see if you can see any errors.
Open latest laravel log in storage/logs/ folder to debug.
If all fails, install laravel-debugbar and see if you can debug there.

How to configure older project in Laravel

I want to run my older project after installing a new OS.
I have cloned that project in htdocs, but it is showing a 404 error in the browser.
I have run these commands:
composer install
composer update --no-script
php artisan key: generate
php artisan migrate

how to make php artisan command available?

I read previous posts here about same problem but they did not solve my problem. I am running wamp latest version on windows 7 and I cloned a laravel app from github then I ran composer install on the root folder of the app and all vendors installed. however I still can not execute php artisan list on the app root folder
I tried also this command
composer global require "laravel/installer=~1.1"
but same problem also there is no laravel folder installed inside vendor folder. I dont know what laravel version used with this web app
So how I can make php artisan work ?
Update:
I opened composer.json file and I found no Laravel frame work to install !! should I return to the developer who made this or I just add Laravel package to composer.json and run composer install again ? if so what I should add to the composer.json ? I dont know which version to install !!
Your project has to have an artisan file in the root directory, otherwise the php artisan command won't work.
I had a similar issue. Fixed it by using the following command, which results in a clean installation.
composer create-project --prefer-dist laravel/laravel my-project
If errors occur, your CLI will show them.
Docs

Resources