app/Http/Controllers/dashboard/admin/RolesController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $request->validate($this->rules);
        $response = new Roles(["name" => $request->post('name'), "id" => $request->post('id')]);
        if (!$response->save()) $this->status();
        return $this->status('success', 'success create new roles');
    }
public function store ( Request $ request ) { $ request -> validate ( $ this -> rules ) ; $ response = new Roles ( [ " name " => $ request -> post ( 'name' ) , " id " => $ request -> post ( 'id' ) ] ) ; if ( ! $ response -> save ( ) ) $ this -> status ( ) ; return $ this -> status ( 'success' , 'success create new roles' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .