/** @test */ public function it_has_the_right_rules() { $this->prepare(); $request = new CreateRoleRequest(); $this->assertTrue(array_key_exists('name', $request->rules())); $this->assertEquals('required', $request->rules()['name']); }
/** * @return mixed */ public function store(CreateRoleRequest $request) { Role::create($request->except(['_token'])); return redirect()->route('genealabs.laravel-governor.roles.index'); }