artisan

Laravel 5: DB Seed class not found

倾然丶 夕夏残阳落幕 提交于 2020-05-24 21:04:59
问题 I have this DatabaseSeeder.php: <?php use Illuminate\Database\Seeder; use Illuminate\Database\Eloquent\Model; class DatabaseSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { Model::unguard(); $this->call('MemberInvitationSeeder'); } } I have this file MemberInvitationSeeder.php, sibling to the DatabaseSeeder.php file <?php use Illuminate\Database\Seeder; use App\MemberInvitation; class MemberInvitationSeeder extends Seeder { public function run(

php laravel artisan migrate error in model?

生来就可爱ヽ(ⅴ<●) 提交于 2020-03-23 12:02:26
问题 i am new to php laravel i try to migrate project with database but i got following error ? Illuminate\Database\QueryException could not find driver (SQL: select * from information_schema.tables where table_schema = lcrud and table_name = migrations and table_type = 'BASE TABLE') at vendor/laravel/framework/src/Illuminate/Database/Connection.php:669 665| // If an exception occurs when attempting to run a query, we'll format the error 666| // message to include the bindings with SQL, which will

Laravel artisan down with message parameter with spaces gives Too many arguments, expected arguments “command”

点点圈 提交于 2020-03-22 09:22:55
问题 I run the artisan: php artisan down --message "Going down for maintenance" --retry=60 [UPDATE] OR run it like @Remul suggested: php artisan down --message="Going down for maintenance" --retry=60 then both gives me the error: [Symfony\Component\Console\Exception\RuntimeException] Too many arguments, expected arguments "command". If run command with no spaces like this: php artisan down --message "Going_down_for_maintenance" --retry=60 No error occurs 回答1: I am using php 7.0.14 I figured out:

Laravel artisan down with message parameter with spaces gives Too many arguments, expected arguments “command”

允我心安 提交于 2020-03-22 09:22:49
问题 I run the artisan: php artisan down --message "Going down for maintenance" --retry=60 [UPDATE] OR run it like @Remul suggested: php artisan down --message="Going down for maintenance" --retry=60 then both gives me the error: [Symfony\Component\Console\Exception\RuntimeException] Too many arguments, expected arguments "command". If run command with no spaces like this: php artisan down --message "Going_down_for_maintenance" --retry=60 No error occurs 回答1: I am using php 7.0.14 I figured out:

Laravel artisan down with message parameter with spaces gives Too many arguments, expected arguments “command”

我与影子孤独终老i 提交于 2020-03-22 09:22:27
问题 I run the artisan: php artisan down --message "Going down for maintenance" --retry=60 [UPDATE] OR run it like @Remul suggested: php artisan down --message="Going down for maintenance" --retry=60 then both gives me the error: [Symfony\Component\Console\Exception\RuntimeException] Too many arguments, expected arguments "command". If run command with no spaces like this: php artisan down --message "Going_down_for_maintenance" --retry=60 No error occurs 回答1: I am using php 7.0.14 I figured out:

Laravel php artisan migrate not working

若如初见. 提交于 2020-03-18 15:20:32
问题 When I try to use 'php artisan migrate' in Laravel I get 2 errors: [Illuminate\Database\QueryException] SQLSTATE[HY000]: General error: 26 file is encrypted or is not a database (SQL: select * from sqlite_master where type = 'table' and name = migrations) [PDOException] SQLSTATE[HY000]: General error: 26 file is encrypted or is not a database I created a storage/database.sqlite file before attempting the migration. I also edited the config/database.php, making the default=sqlite . I am using

Laravel - Create automated CRUD?

馋奶兔 提交于 2020-01-22 04:07:05
问题 Is Artisan got a tool for create the code of a CRUD automated in Laravel? I search information about it but all the options are with an external tool outside of Artisan. 回答1: create the code of a CRUD No! But if you want the CRUD methods copied from a properly defined stub use php artisan make:controller EntityController -r where the -r flag means a resourceful controller for the model Entity with create , show , index , store , update , edit , and delete methods The methods uses the proper

Laravel create migration file in specific folder

拜拜、爱过 提交于 2020-01-14 07:45:29
问题 I've created Payment package for my laravel project I want to make migration files inside migrations folder of my package. How can create it using artisan command? I want something like php artisan make:migration packages/Payment/src/Database/add_orderId_to_cart_payment_table 回答1: Use this command on root folder php artisan make:migration create_products_table --create=products //create only Migration file php artisan make:model Product -m //Create Migration, Model file php artisan make:model

Running multiple Laravel queue workers using Supervisor

和自甴很熟 提交于 2020-01-10 19:45:10
问题 I using Laravel queues using a database driver and supervisor to keep a queue worker running all the time: [program:laravel_queue] command=php artisan queue:listen --timeout=1800 --tries=5 directory=/var/app/current stdout_logfile=/var/app/support/logs/laravel-queue.log logfile_maxbytes=0 logfile_backups=0 redirect_stderr=true autostart=true autorestart=true startretries=86400 EOB Some of the queue tasks can take around 10 minutes to complete. I have 2 parts to the question: 1) How can i edit

Running multiple Laravel queue workers using Supervisor

倖福魔咒の 提交于 2020-01-10 19:44:49
问题 I using Laravel queues using a database driver and supervisor to keep a queue worker running all the time: [program:laravel_queue] command=php artisan queue:listen --timeout=1800 --tries=5 directory=/var/app/current stdout_logfile=/var/app/support/logs/laravel-queue.log logfile_maxbytes=0 logfile_backups=0 redirect_stderr=true autostart=true autorestart=true startretries=86400 EOB Some of the queue tasks can take around 10 minutes to complete. I have 2 parts to the question: 1) How can i edit