How can I remove all the boilerplate included in Laravel 5, such as bootstrap/authentication etc?
In laracasts lessons Jeffrey Way told about php artisan fresh command, but there is no such command in stable release
Unfortunately after that Laracasts episode was posted - Taylor removed the fresh command on Dec 17 2014: https://github.com/laravel/framework/commit/37ebc7ecc693405a717239ca30e0586d0a71e4d3
For now you'll have to manually delete the files yourself. Or create a pull request to add it back in.
Update 27th Feb: As of today the artisan fresh command is back in Laravel 5 https://github.com/laravel/framework/commit/c69ddcf4941f6b23349b882171c44e0071963647
Update 9th June: Sad news, as of Laravel 5.1 artisan fresh command is removed again.
Related
I am going to start working on existing Laravel project and I checked Laravel version using 2 ways:
I run php artisan --version and Laravel Installer 4.2.10 got printed.
I checked composer.json file and there is laravel/framework": "^8.0.
Which one is real one? Thank you in advance.
PS: This question is not about how to. It is about why 2 different method return 2 different answer.
To answer your question, the Laravel Installer is the composer laravel installer which allows devs to run
laravel new blog
instead of
composer create-project laravel/laravel:^8.0 blog
Laravel Framework is the one that will advise what version of laravel you are running
Search in composer.lock "name": "laravel/framework", for see current installed version
using php artisan --version to check via CLI.
{{ app()->version() }} to print version in blade template.
I did a fresh Laravel 6.0.3 install on laragon and I am trying to install backpack.
I did
composer require backpack/crud correclty
but then when I tried to do the next step
php artisan backpack:base:install
I get an error
Symfony\Component\Process\Exception\ProcessFailedException : The command "composer require backpack/generators --dev" failed.
Exit Code: 2(Misuse of shell builtins)
I tried to delete the cache, to add timeout 600 and I do not know what else to do.
There was indeed a problem with installing backpack/generators - composer did not fall back to an appropriate version, but it is now fixed. You should be able to run php artisan backpack:base:install without problems.
If you hit any roadblocks during the installation, I recommend you follow the manual installation procedure, instead of php artisan backpack:base:install.
Backpack v3.4 is a collection of packages for Laravel 5.5 / 5.6.
Right under requirement in Backpack.io it says it requires laravel 5.5 or 5.6 and PHP7.
It's not compatible with laravel 6.*
I'm just learning Laravel 5 and I am loving it.
I have an issue though, my php artisan command just stopped working all of a sudden. It shows this error
[RuntimeException]
Directory name must not be empty.
I am running on a windows10 pc . Thanks
Today I got the same issue while working on local environment, I really don't know how but my config folder was deleted automatically. Fortunately, I had backup with me and I simply re-add the config folder into my project and my site is back.
I think you need to update your composer like:
composer update
OR
composer update --no-scripts
after you can clear the cache
php artisan config:cache
php artisan config:clear
php artisan cache:clear
Hi I have a problem where Laravel 5's vendor:publish command does not override old package assets. Does anyone know if this is the correct behaviour or do I have to somehow delete the old previous version before I can publish?
regards
Try using the --force flag.
$ php artisan vendor:publish --force
I haven't used composer or Laravel 4 during the last couple of weeks, today I created a new Laravel project and suddenly Monolog is causing a ton of problems.
At first I was unable to fully create the project, afterwards I was unable to create a migration, and now I can't run php artisan serve any more. I followed the steps on Laravel 4 Class not found in bootstrap/compiled.php and that helped the first time around, but after creating the second migration and wanting to run a php artisan migrate I get the following error:
PHP Fatal error: Class 'Monolog\Formatter\LineFormatter' not found in /bootstrap/compiled.php on line 7991
How do I fix this?
I have update composer using self-update, I have tried to use dump-autoload, and the other steps in the question I posted a link to.
I solved this issue by deleting the vendorfolder and then running a composer install to ensure a fresh install of all packages in the composer.json.
I'm not sure how you installed the project. If you're trying to impose Laravel 4 over an old project, I suggest you to install FRESH Laravel using this command
composer create-project laravel/laravel project_name --prefer-dist
This should not give you any installation related problem unless the Laravel installation itself is broken. Which is very unlikely to happen.
You can then copy your controllers, models, migrations etc from the old project.
Good luck.