<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
public function __construct()
{
$this->middleware(function ($request, $next) {
return $next($request);
});
}
}
<meta name="csrf-token" content="{{ csrf_token() }}">
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
{!! Form::select('subscribe_id', array(0 => 'Выберите тип подписки', '5' => 'Демо-доступ', '6' => 'Доступ на 1 месяц 1500 руб.', '7' => 'Доступ на 3 месяца 3600 руб.','8' => 'Доступ на 1 год 12600 руб.'),null,['class' => 'custom-class'])!!}
$latest выдает null
optional($latest)->date
$last = Carbon::createFromTimestamp($latest->date)->toDateTimeString();//477 stroka
в Tournaments
/**
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = [
'created_at',
'updated_at',
'date'
];