dimanche 24 septembre 2017

how to route my blade file in laravel 5.2

I am working with Laravel app. I need route collaborator.blade.php file in projects folder in view file. I have following form and after fill form data and save it need redirect it to collaborator.blade.php file. My form working with project controller

 $project = new Project;
        $project->project_name   = $request->input('name');
        $project->project_status = $request->input('status');
        $project->group          = $request->input('group');
        $project->color          = $request->input('color');
        $project->project_notes  = $request->input('notes');
        $project->user_id        = Auth::user()->id;

        $duplicate = Project::where('project_name',$project->project_name)->first();
        if($duplicate)
        {
            return redirect()->route('projects.index')->with('warning','Title already exists');
        }   

        $project->save();

        return redirect()->route('projects.collaborators')->with('info','Your Project has been created successfully');
    }

but when I click form button system occured an error message like this.

Route [projects.collaborators] not defined.

how can fix this problem?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2xxKP9m
via IFTTT

Aucun commentaire:

Enregistrer un commentaire