PHP: <?php namespace App\Http\Controllers\Admin; use Illuminate\Http\Request; use App\Http\Requests; use App\Http\Controllers\Controller; use Illuminate\Http\Response; use Illuminate\Http\RedirectResponse; use DB; class AboutController extends Controller { // public function show() { if(view()->exists('default.about')) { // $artiles = DB::select("SELECT * FROm `articles` WHERE id = :id",['id'=>2]); DB::insert("INSERT INTO `articles` (`name`,`text`) VALUES (?, ?)", ['test 1','TEXT']); $artiles = DB::select("SELECT * FROm `articles` "); //$result = DB::connection()->getPdo()->lastInsertId(); //$result = DB::update('UPDATE `articles` SET `name` = ? WHERE `id` = ?', ["TEST 2",6]); //$result = DB::update('UPDATE `articles` SET `name` = ? WHERE `id` = ?', ["TEST 3",6]); //$result = DB::delete('DELETE FROM `articles` WHERE `id` = ?', [6]); //DB::statement('DROP table `articles`'); // $artiles = DB::select("SELECT * FROm `articles"); // // //dump($result); dump($artiles); //dd() // // foreach($artiles as $article) { // // } return view('default.about')->withTitle('Hello World'); } abort(404); } } --- Добавлено --- Whoops, looks like something went wrong. 3/3 QueryException in Connection.php line 770: SQLSTATE[HY000]: General error: 1364 Field 'img' doesn't have a default value (SQL: INSERT INTO `articles` (`name`,`text`) VALUES (test 1, TEXT)) in Connection.php line 770 at Connection->runQueryCallback('INSERT INTO `articles` (`name`,`text`) VALUES (?, ?)', array('test 1', 'TEXT'), object(Closure)) in Connection.php line 726 at Connection->run('INSERT INTO `articles` (`name`,`text`) VALUES (?, ?)', array('test 1', 'TEXT'), object(Closure)) in Connection.php line 481 at Connection->statement('INSERT INTO `articles` (`name`,`text`) VALUES (?, ?)', array('test 1', 'TEXT')) in Connection.php line 435 at Connection->insert('INSERT INTO `articles` (`name`,`text`) VALUES (?, ?)', array('test 1', 'TEXT')) in DatabaseManager.php line 317 at DatabaseManager->__call('insert', array('INSERT INTO `articles` (`name`,`text`) VALUES (?, ?)', array('test 1', 'TEXT'))) in Facade.php line 237 at Facade::__callStatic('insert', array('INSERT INTO `articles` (`name`,`text`) VALUES (?, ?)', array('test 1', 'TEXT'))) in AboutController.php line 22 at AboutController->show() at call_user_func_array(array(object(AboutController), 'show'), array()) in Controller.php line 55 at Controller->callAction('show', array()) in ControllerDispatcher.php line 44 at ControllerDispatcher->dispatch(object(Route), object(AboutController), 'show') in Route.php line 189 at Route->runController() in Route.php line 144 at Route->run(object(Request)) in Router.php line 653 at Router->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 53 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Mymiddleware.php line 29 at Mymiddleware->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in SubstituteBindings.php line 41 at SubstituteBindings->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 65 at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49 at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 64 at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37 at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59 at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104 at Pipeline->then(object(Closure)) in Router.php line 655 at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 629 at Router->dispatchToRoute(object(Request)) in Router.php line 607 at Router->dispatch(object(Request)) in Kernel.php line 268 at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 53 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 64 at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46 at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104 at Pipeline->then(object(Closure)) in Kernel.php line 150 at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 117 at Kernel->handle(object(Request)) in index.php line 53 с