$builder = Model::where('....');
$sql = $builder->toSql();
$bindings = $builder->getBindings();
foreach ($bindings as $binding) {
$value = is_numeric($binding) ? $binding : "'".$binding."'";
$sql = preg_replace('/\?/', $value, $sql, 1);
}
echo $sql;
<?php $fi=$find->where('c_id_group_item', $gr->c_id_group); ?>
'guards' => [
'api' => [
'driver' => 'cent',
'provider' => 'users',
],
],
<?php
class MyModel extends Model {
protected $dates = ['signed_at'];
}
// ....
$model = MyModel::first();
echo $model->signed_at->format('d.m.Y H:i:s');
function __construct() {
$this->middleware('auth', ['only' => ['create', 'store']]);
}
$router->resource('adboard', 'AdboardController');