$ sail artisan admin
略
Laravel-admin version 1.8.14
Available commands:
admin:make Make admin controller
admin:controller Make admin controller from giving model
admin:menu Show the admin menu
admin:install Install the admin package
admin:publish re-publish laravel-admin's assets, configuration, language and migration files. If you want overwrite the existing files, you can add the `--force` option
admin:uninstall Uninstall the admin package
admin:import Import a Laravel-admin extension
admin:create-user Create a admin user
admin:reset-password Reset password for a specific admin user
admin:extend Build a Laravel-admin extension
admin:export-seed Export seed a Laravel-admin database tables menu, roles and permissions
admin:minify Minify the CSS and JS
admin:form Make admin form widget
admin:permissions generate admin permission base on table name
admin:action Make a admin action
admin:generate-menu Generate menu items based on registered routes.
admin:config Compare the difference between the admin config file and the original
App\Admin\Controllers\UserController created successfully.
Add the following route to app/Admin/routes.php:
$router->resource('users', UserController::class);
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`))
MySQLのインデックス最大長が変わったことで発生するエラー
AppServiceProviderに以下の記述を追加すればindexが短くなるので解決
Laravelで開発すると大体最初にいじるのがここですね(笑
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
最近のコメント