草庐IT

php - 如何在 Laravel(PHP artisan )中删除 Auth

使用这个命令phpartisanmake:auth我得到了所有的auth东西,但我想知道如何删除它,或者只是如何重新初始化。我已经删除了所有创建的文件,但是当我重新运行命令时,这不会再次创建mysql用户表 最佳答案 查看make:authcommandsourcecode了解此命令添加或更改的确切文件并将更改还原。如您所见,您应该删除一些View和几个Controller。auth/login.blade.phpauth/register.blade.phpauth/passwords/email.blade.phpauth/pa

php - 类 'UserTableSeeder' 不存在 - Laravel 5.0 [php artisan db :seed]

迁移我的数据库后,我正在尝试一个基本的phpartisandb:seed,但它一直在cmd中返回标题错误-[ReflectionException]Class'UserTableSeeder'doesnotexist我尝试过的事情更改'UserTableSeeder.php'文件'namespaceDatabase\seeds;'的命名空间和'使用数据库\种子\用户表种子;'在“DatabaseSeeder.php”文件中以下是迁移increments('id');$table->string('name');$table->string('email')->unique();$tab

php - laravel 4 artisan -- 如何回滚到特定的迁移状态?

假设我得到了a.php、b.php、c.php和d.php迁移类文件。如何回滚到特定的迁移状态,例如在b.php中定义的状态,使用artisan命令? 最佳答案 恐怕你不能直接这样做。您可以:1、RollbackTheLastMigrationOperation(所有迁移都在最后一批运行)phpartisanmigrate:rollback2、回滚所有迁移phpartisanmigrate:reset3、回滚所有迁移并再次运行它们phpartisanmigrate:refreshphpartisanmigrate:refresh--

php - artisan ,在数据库中创建表

我正在尝试在Laravel5中创建mysql表。我在/project/database/migrations中创建了一个名为users.php的文件:[...]publicfunctionup(){Schema::create('users',function(Blueprint$table){$table->increments('id');$table->string('username');$table->string('fullname');$table->int('number');$table->string('email')->unique();$table->strin

PHP Artisan Tinker 从任何命令崩溃

我以前没有遇到过这个问题,但是我的phpartisantinker因发出任何命令而崩溃-并且没有留下任何关于导致崩溃的日志。project4$phpartisantinkerPsyShellv0.9.9(PHP7.3.0—cli)byJustinHileman>>>use\App\Jobs\testJob;project4$甚至是最简单的命令:project4$phpartisantinkerPsyShellv0.9.9(PHP7.3.0—cli)byJustinHileman>>>print("HelloWorld!");project4$我几乎怀疑它是否没有正确连接到PHP,但我在

php - 如何回显 Laravel 和 Artisan 中的控制台?

我很好奇,我正在使用Laravel和Artisan进行迁移。有没有办法将信息输出到控制台?我似乎找不到任何关于此的信息。例如:generate_user($i));}DB::table('users')->insert($users);}publicfunctiondown(){DB::table('users')->delete();}} 最佳答案 不知道您使用的是Laravel3还是Laravel4,以及它是否也可以在Laravel3中使用,但我在thedocs中找到了这个.$this->info('Creatingsample

php - Lumen (Laravel) Eloquent php artisan make :model not defined

我将Lumen1.0用于API项目。我已经通过取消注释bootstrap/app.php文件中的以下行来启用Eloquent:$app->withEloquent();但是当我想创建我的第一个迁移模型时,它失败了:phpartisanmake:modelBook--migration错误信息:[InvalidArgumentException]Command"make:model"isnotdefined.Didyoumeanoneofthese?make:seedermake:migration关于Eloquent的Laravel文档(http://laravel.com/docs/

php artisan migrate throwing [PDO Exception] 找不到驱动程序 - 使用 Laravel

我在安装laravel时遇到了不好的体验。但是,我能够这样做并进入下一个级别。我使用了生成器并创建了我的迁移。但是当我输入最后一个命令时phpartisanmigrate它抛出PDOException-找不到驱动程序。'mysql'=>array('driver'=>'mysql','host'=>'localhost','unix_socket'=>'/Applications/MAMP/tmp/mysql/mysql.sock','database'=>'database','username'=>'root','password'=>'','charset'=>'utf8','c

php - php artisan migrate 命令放在哪里

Tryingtodeploythelaravelapplicationondockerstack.WhatIamconfusedornotabletofigureoutiswherecanIrunthisphpartisanmigrate:freshtogeneratethetablesrequiredinmysql.服务和任务运行良好docker-compose.ymlversion:'3.3'networks:smstake:ipam:config:-subnet:10.0.10.0/24services:db:image:mysql:5.7networks:-smstakepor

无法在AWS灯服务器上运行PHP Artisan迁移

我正在尝试在AWS实例上部署Laravel项目。我遵循本教程以获取Web服务器和MySQL设置:http://docs.aws.amazon.com/awsec2/latest/userguide/install-lamp.html然后安装了作曲家,在实例上部署了Laravel项目,更改了一些HTTP配置和其他一些设置,并使其正常工作,现在我试图使用我的本地数据库迁移phpartisanmigrate每当我尝试时,我都会得到:[PDOException]SQLSTATE[HY000][2002]Nosuchfileordirectory我在这个问题中尝试了一些解决方案:pDoexception