public function store(Request $request)
    {
        $this->validate($request, NavigationAdmin::$rules, NavigationAdmin::$messages);

        $inputs = $request->only([
            'icon',
            'title',
            'slug',
            'description',
            'help_index_title',
            'help_index_content',
            'help_create_title',
            'help_create_content',
            'help_edit_title',
            'help_edit_content',
            'parent_id',
            'url_parent_id'
        ]);
        $inputs['is_hidden'] = boolval($request->has('is_hidden'));
        $inputs['url_parent_id'] = ($inputs['url_parent_id'] == 0 ? $inputs['parent_id'] : $inputs['url_parent_id']);

        $row = $this->createEntry(NavigationAdmin::class, $inputs);

        if ($row) {
            $row->updateUrl()->save();
            $row->roles()->attach(input('roles'));
        }

        return redirect_to_resource();
    }
public function store(Request $request)
    {
        $this->validate($request, NavigationAdmin::$rules, NavigationAdmin::$messages);

        $inputs = $request->only([
            'icon',
            'title',
            'slug',
            'description',
            'help_index_title',
            'help_index_content',
            'help_create_title',
            'help_create_content',
            'help_edit_title',
            'help_edit_content',
            'parent_id',
            'url_parent_id'
        ]);
        $inputs['is_hidden'] = boolval($request->has('is_hidden'));
        $inputs['url_parent_id'] = ($inputs['url_parent_id'] == 0 ? $inputs['parent_id'] : $inputs['url_parent_id']);

        $row = $this->createEntry(NavigationAdmin::class, $inputs);

        if ($row) {
            $row->updateUrl()->save();
            $row->roles()->attach(input('roles'));
        }

        return redirect_to_resource();
    }
public function store ( Request $ request ) { $ this -> validate ( $ request , NavigationAdmin :: $ rules , NavigationAdmin :: $ messages ) ; $ inputs = $ request -> only ( [ 'icon' , 'title' , 'slug' , 'description' , 'help_index_title' , 'help_index_content' , 'help_create_title' , 'help_create_content' , 'help_edit_title' , 'help_edit_content' , 'parent_id' , 'url_parent_id' ] ) ; $ inputs [ 'is_hidden' ] = boolval ( $ request -> has ( 'is_hidden' ) ) ; $ inputs [ 'url_parent_id' ] = ( $ inputs [ 'url_parent_id' ] == 0 ? $ inputs [ 'parent_id' ] : $ inputs [ 'url_parent_id' ] ) ; $ row = $ this -> createEntry ( NavigationAdmin :: class , $ inputs ) ; if ( $ row ) { $ row -> updateUrl ( ) -> save ( ) ; $ row -> roles ( ) -> attach ( input ( 'roles' ) ) ; } return redirect_to_resource ( ) ; }
Store a newly created navigation in storage.

@param Request $request
@return Response
Store a newly created navigation in storage .