I'm trying to input some data to database
i cant input some data to database because i got that error
but i can login with multi auth in my project
and i got some error
how i can solve this error?
controller
<?php
namespace AppHttpControllers;
use IlluminateHttpRequest;
use AppJurusan;
use Auth;
class AdminActionsController extends Controller
{
public function addjurusan(Request $request)
{
$jurusan = new Jurusan();
$jurusan->nama_jurusan=$request->nama;
$file=$request->file('fotohimpunan');
if (!$file) {
return redirect()->route('in.jurusan')->with('alert','foto harus diisi!');
}
$file_name=$file->getClientOriginalName();
$path=public_path('/img');
$file->move($path,$file_name);
$jurusan->fotohimpunan='public/img/'.$file_name;
$jurusan->status='disable';
// dd($jurusan);
$jurusan->save();
return redirect()->route('in.jurusan');
}
}
guard
<?php
return [
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
// Guard
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
],
'admin' => [
'driver' => 'session',
'provider' => 'admin',
],
'admin-api' => [
'driver' => 'token',
'provider' => 'admin',
],
'panitia' => [
'driver' => 'session',
'provider' => 'panitia',
],
'panitia-api' => [
'driver' => 'token',
'provider' => 'panitia',
],
'mahasiswa' => [
'driver' => 'session',
'provider' => 'mahasiswa',
],
'mahasiswa-api' => [
'driver' => 'token',
'provider' => 'mahasiswa',
],
],
// Providers
'providers' => [
'panitia' => [
'driver' => 'eloquent',
'model' => AppPanitia::class,
],
'admin' => [
'driver' => 'eloquent',
'model' => AppAdmin::class,
],
'mahasiswa' => [
'driver' => 'eloquent',
'model' => AppMahasiswa::class,
],
],
// Password
'passwords' => [
'users' => [
'provider' => 'users',
'table' => 'password_resets',
'expire' => 60,
],
],
];
how i can solve my problems please help me
i can login with multi auth but if i try to input some data i got that error
See Question&Answers more detail:
os