jeudi 5 janvier 2017

Grouped and named routes are empty Laravel 5.3

This my code in routes/web.php:

Route::group(['prefix' => 'do'], function(){

  Route::get('/contact', function ($name=null) {
          return view('actions.contact', ['name' => $name]);
      })->name('contact');

      Route::post('/', function (\Illuminate\Http\Request $request) {
          if(isset($request) && $request['name']){
              if(strlen($request['name']) > 0){
                  return view('actions.send', ['action' => $request]);
              }
          }
          return redirect()->back();
      })->name('send');
});

The post route works and its action attribute is /do, but first 1, when i call it in view:

 <a href="">GREET</a>

I see empty href attribute with no errors.



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

Aucun commentaire:

Enregistrer un commentaire