class UserTableSeeder extends Seeder
{
public function run()
{
$users = [
[
'name' => 'Author',
'email' => 'seriiburduja@mail.ru',
'password' => bcrypt('seriiserii;')
],
[
'name' => 'Admin',
'email' => 'seriiburduja@gmail.com',
'password' => bcrypt('seriiserii;')
]
];
DB::table('users')->insert($users);
}
}
Column 'user_id' cannot be null
- в миграции у этого поля нету свойства ->nullable(), поэтому и не должно быть null. #docker
alias dc-up="sudo docker-compose up -d"
alias dc-down="sudo docker-compose down"
alias dc-down-orphan="sudo docker-compose down --remove-orphans"
alias dc-ps="sudo docker-compose ps"
alias dc-migrate="docker-compose exec php-fpm php artisan migrate"
alias dc-clear="docker-compose exec php-fpm php artisan view:clear && docker-compose exec php-fpm php artisan cache:clear && docker-compose exec php-fpm php artisan config:clear && docker-compose exec php-fpm php artisan route:clear"
alias dc-seed="docker-compose exec php-fpm php artisan db:seed"
alias dc-tinker="docker-compose exec php-fpm php artisan tinker"
alias dc-ide-generate="docker-compose exec php-fpm php artisan ide-helper:generate"
alias dc-install="docker-compose exec node npm install"
alias dc-prod="docker-compose exec node npm run prod"
alias dc-perm="sudo chown ${USER}:${USER} bootstrap/cache -R && sudo chown ${USER}:${USER} storage -R"
function dc_make_seeder(){
docker-compose exec php-fpm php artisan make:seeder $1
}
function dc_list(){
sudo docker-compose exec php-fpm php artisan route:list -c --name=$1
}
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ config('app.name', 'Laravel') }}</title>
<!-- Scripts -->
<script src="{{ mix('js/app.js', 'build') }}" defer></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
<!-- Styles -->
<link href="{{ mix('css/app.css', 'build') }}" rel="stylesheet">
</head>
<body>
<div id="app">
<nav class="main-header navbar navbar-expand-md navbar-light bg-white shadow-sm">
<div class="container">
<div class="main-header__top">
<ul>
<li>
<a href="{{ url('/') }}">
{{ config('app.name', 'Laravel') }}
</a>
</li>
<li>
<a href="{{ route('contact') }}">Contacts</a>
</li>
</ul>
<ul class="main-header__menu">
@guest
<ul>
<li>
<a href="{{ route('register') }}">Register</a>
</li>
<li>
<a href="{{ route('login') }}">Login</a>
</li>
</ul>
@else
<ul>
<li>
<a href="#">{{ Auth::user()->email }}</a>
</li>
<li>
<a href="{{ route('admin.index') }}">Admin</a>
</li>
<li>
<a href="{{ route('logout') }}">Logout</a>
</li>
</ul>
@endauth
</div>
</div>
</nav>
<main class="main py-4">
<div class="container">
@section('breadcrumbs', Breadcrumbs::render())
@yield('breadcrumbs')
@include('layouts.partials.flash')
@yield('content')
</div>
</main>
<div class="main-footer">
<div class="container">
<span>© {{ date('Y') }} - Advertis</span>
</div>
</div>
</div>
<script {{ asset('js/bootstrap.js') }}></script>
<script {{ asset('js/app.js') }}></script>
</body>
</html>
У меня такая же проблема, не решили?