app/Http/Controllers/V1/MainController.php
//chamar a pagigina inicial com as tarefas visiveis
chamar a pagigina inicial com as tarefas visiveis
chamar a pagigina inicial com as tarefas visiveis
public function home()
    {
        if (!$this->checksessao()) {
            return redirect()->route('login');
        }
        $id = session()->get('usuario')->id;
        $tarefa = task::where('id_usuario', $id)->where('visivel', 1)->orderBy('created_at', 'desc')->get();
        return view('home', ['tarefa' => $tarefa]);
    }
public function home ( ) { if ( ! $ this -> checksessao ( ) ) { return redirect ( ) -> route ( 'login' ) ; } $ id = session ( ) -> get ( 'usuario' ) -> id ; $ tarefa = task :: where ( 'id_usuario' , $ id ) -> where ( 'visivel' , 1 ) -> orderBy ( 'created_at' , 'desc' ) -> get ( ) ; return view ( 'home' , [ 'tarefa' => $ tarefa ] ) ; }
chamar a pagigina inicial com as tarefas visiveis
chamar a pagigina inicial com as tarefas visiveis
// Storage::delete(public_path('assets\fotos_usuarios\foto.jpg'));