app/Http/Controllers/ParliamentController.php
/**
     * Show the form for editing the specified resource.
     *
     * @param  \App\Translator  $translator
     * @return \Illuminate\Http\Response
     */
Show the form for editing the specified resource.
Show the form for editing the specified resource .
public function edit($id)
    {
        $parliament = Parliament::findOrFail($id);
        if(Auth::user()->id !== $parliament->user_id && !$this->are_you_a_super_admin()){
            return response()->view('errors.404', 'Permission Denied', Response::HTTP_UNAUTHORIZED);
        }
        return view('parliament.edit')->with('parliament',$parliament)->with('countries',$this->countries)->
        with('types_of_parliaments',$this->types_of_parliaments);
    }
public function edit ( $ id ) { $ parliament = Parliament :: findOrFail ( $ id ) ; if ( Auth :: user ( ) -> id !== $ parliament -> user_id && ! $ this -> are_you_a_super_admin ( ) ) { return response ( ) -> view ( 'errors.404' , 'Permission Denied' , Response :: HTTP_UNAUTHORIZED ) ; } return view ( 'parliament.edit' ) -> with ( 'parliament' , $ parliament ) -> with ( 'countries' , $ this -> countries ) -> with ( 'types_of_parliaments' , $ this -> types_of_parliaments ) ; }
Show the form for editing the specified resource.
Show the form for editing the specified resource .