Code Duplication    Length = 8-8 lines in 2 locations

src/Form.php 2 locations

@@ 363-370 (lines=8) @@
360
     *
361
     * @return \Illuminate\Http\RedirectResponse
362
     */
363
    protected function redirectAfterStore()
364
    {
365
        admin_toastr(trans('admin.save_succeeded'));
366
367
        $url = Input::get(Builder::PREVIOUS_URL_KEY) ?: $this->resource(0);
368
369
        return redirect($url);
370
    }
371
372
    /**
373
     * Get ajax response.
@@ 559-566 (lines=8) @@
556
     *
557
     * @return \Illuminate\Http\RedirectResponse
558
     */
559
    protected function redirectAfterUpdate()
560
    {
561
        admin_toastr(trans('admin.update_succeeded'));
562
563
        $url = Input::get(Builder::PREVIOUS_URL_KEY) ?: $this->resource(-1);
564
565
        return redirect($url);
566
    }
567
568
    /**
569
     * Handle editable update.