laravel 4中的重定向问题

时间:2014-03-06 11:00:28

标签: laravel-4

我正在使用Laravel 4,我希望在路由逻辑之后添加filter。所以执行过滤器但不执行重定向指令return Redirect::to($pool->url . '/share')->with('poolURL' ,URL::to($pool->url)); 这段代码:

   if(Session::has('pool')){

    $entry = Session::get('pool');

    // Update pool userId

    $entry['user_id'] = Auth::user()->id;

    $pool = Pool::create($entry);

        // Update pool URL
      $pool->url = Auth::user()->username
       . '/pool/'
       . Str::slug($pool->beneficiary)
       . '/'
       . $pool->id;

        // Update and redirect to Share page
       if($pool->save())
       {
       return Redirect::to($pool->url . '/share')->with('poolURL' ,URL::to($pool->url));
       }

    }

0 个答案:

没有答案