preg_match('/^[a-zA-Z0-9\'._-]+$/u', $value);
public function rules()
{
return [
'file' => 'required|mimes:jpeg'
];
}
Route::get('{catalog}/{otherLinks?}', 'MainController@getPage')->where('otherLinks', '(.*)');
Route::get('{catalog}/{otherLinks?}', 'MainController@getPage')->where('otherLinks', '(.*)');
class MainController extends BaseController {
public function getPage($pageLink, $otherLinks = null)
{
if($otherLinks)
{
$otherLinks = explode('/', $otherLinks);
// твой код
}
}
}
dd($auth->user()); // null
view()->composer('partials.nav', function($view) use ($auth){
dd($auth->user()); // returns User object
$view->with('currentUser', $auth->user()); // does what you expect
});
{{ Form::textarea('desc1', null, array('id'=>'editor')) }}
<script type="text/javascript">
CKEDITOR.replace( 'editor' );
</script>