artisan

ReflectionException: Class ClassName does not exist - Laravel

久未见 提交于 2019-11-27 12:18:21
As soon, I am typing php artisan db:seed command. I'm getting Error Like: [ReflectionException] Class UserTableSeeder does not exist root@dd-desktop:/opt/lampp/htdocs/dd/laravel# php artisan db:seed Here, Is my UserTableSeeder.php & DatabaseSeeder.php Page UserTableSeeder.php <?php use Illuminate\Database\Seeder; use Illuminate\Database\Eloquent\Model; class UserTableSeeder extends Seeder { public function run() { DB::table('users')->delete(); User::create(array( 'name' => 'Chris Sevilleja', 'username' => 'sevilayha', 'email' => 'chris@scotch.io', 'password' => Hash::make('awesome'), )); } }

Laravel 5 Clear Views Cache

百般思念 提交于 2019-11-27 11:04:01
I notice that Laravel cache views are stored in ~/storage/framework/views. Over time, they get to eat up my space. How do I delete them? Is there any command that could? I tried php artisan cache:clear, but it is not clearing the views cache. With that, I have to manually delete the files in the said folder. Also, how do I disable the views caching? DilipGurung There is now a php artisan view:clear command for this task since Laravel 5.1 Jake Pucan To get all the artisan command, type... php artisan If you want to clear view cache, just use: php artisan view:clear If you don't know how to use

Could not open input file: artisan

穿精又带淫゛_ 提交于 2019-11-27 10:18:24
When trying to create a new laravel project, The following error appears on the CLI: Could not open input file: artisan Script php artisan clear-compiled handling the post-install-cmd event returned with an error I am using the latest version of XAMPP v3.2.1 with PHP 5.5.15 and with mcrypt enabled (made sure of that by issuing the command php -m). And I am running windows 8.1 You need to first create Laravel project and if you already have one you need to go to this project dir using cd command in terminal for example cd myproject . Now you will be able to run any artisan commands, for example

Laravel 5 - artisan seed [ReflectionException] Class SongsTableSeeder does not exist

拈花ヽ惹草 提交于 2019-11-27 10:08:46
When I run php artisan db:seed I am getting the following error: [ReflectionException] Class SongsTableSeeder does not exist What is going on? My DatabaseSeeder class: <?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('SongsTableSeeder'); } } My SongsTableSeeder class: <?php // Composer: "fzaninotto/faker": "v1.4.0" use Faker\Factory as Faker; use Illuminate\Database\Seeder; use DB; class SongsTableSeeder extends Seeder {

What are the Differences Between “php artisan dump-autoload” and “composer dump-autoload”?

帅比萌擦擦* 提交于 2019-11-27 04:10:33
问题 I am pretty new to Laravel 4 and Composer. While I do Laravel 4 tutorials, I couldn't understand the difference between those two commands; php artisan dump-autoload and composer dump-autoload What's the difference between them? 回答1: Laravel's Autoload is a bit different: 1) It will in fact use Composer for some stuff 2) It will call Composer with the optimize flag 3) It will 'recompile' loads of files creating the huge bootstrap/compiled.php 4) And also will find all of your Workbench

How to keep Laravel Queue system running on server

前提是你 提交于 2019-11-27 02:50:47
I recently setup a Laravel Queue system. The basics are a cronjob calls a command which adds jobs to a queue and calls a second command which sends an email. The system works when I ssh into my server and run php artisan queue:listen, but if I close my terminal the listener shuts down and the jobs stack up and sit in queue until I ssh back in and run listen again. What is the best way to keep my queue system running in the background without needing to keep my connection open via ssh? I tried running php artisan queue:work --daemon , and it completed the jobs in the queue, but when I closed my

SQLSTATE[HY000] [2002] Connection refused within Laravel homestead

早过忘川 提交于 2019-11-26 19:48:44
问题 Using Mac OS X and Homestead 2.2.1 with Laravel 5.2. In terminal (within homestead in my project folder) I can do php artisan to see all the available commands. When I try to run php artisan migrate I get a connection error: SQLSTATE[HY000] [2002] Connection refused I have setup a Laravel project with these .env settings DB_HOST=127.0.0.1 DB_DATABASE=tcv DB_USERNAME=homestead DB_PASSWORD=secret I have also tried localhost for DB_HOST and root for DB_USERNAME and DB_PASSWORD. And all possible

No Application Encryption Key Has Been Specified

雨燕双飞 提交于 2019-11-26 18:45:01
问题 I'm new to Laravel and I'm trying to use the Artisan command... php artisan serve It displays... Laravel development server started: http://127.0.0.1:8000 However, it won't automatically launch and when I manually enter http://127.0.0.1:8000 it shows this error: RuntimeException No application encryption key has been specified. Any ideas? I'm using Laravel framework 5.5-dev. 回答1: From Encryption - Laravel - The PHP Framework For Web Artisans: "Before using Laravel's encrypter, you must set a

Laravel 5 - artisan seed [ReflectionException] Class SongsTableSeeder does not exist

让人想犯罪 __ 提交于 2019-11-26 17:54:07
问题 When I run php artisan db:seed I am getting the following error: [ReflectionException] Class SongsTableSeeder does not exist What is going on? My DatabaseSeeder class: <?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('SongsTableSeeder'); } } My SongsTableSeeder class: <?php // Composer: "fzaninotto/faker": "v1.4.0" use Faker

ReflectionException: Class ClassName does not exist - Laravel

血红的双手。 提交于 2019-11-26 15:59:46
问题 As soon, I am typing php artisan db:seed command. I'm getting Error Like: [ReflectionException] Class UserTableSeeder does not exist root@dd-desktop:/opt/lampp/htdocs/dd/laravel# php artisan db:seed Here, Is my UserTableSeeder.php & DatabaseSeeder.php Page UserTableSeeder.php <?php use Illuminate\Database\Seeder; use Illuminate\Database\Eloquent\Model; class UserTableSeeder extends Seeder { public function run() { DB::table('users')->delete(); User::create(array( 'name' => 'Chris Sevilleja',