Code Duplication    Length = 8-8 lines in 2 locations

src/Form.php 2 locations

@@ 367-374 (lines=8) @@
364
     *
365
     * @return \Illuminate\Http\RedirectResponse
366
     */
367
    protected function redirectAfterStore()
368
    {
369
        admin_toastr(trans('admin.save_succeeded'));
370
371
        $url = Input::get(Builder::PREVIOUS_URL_KEY) ?: $this->resource(0);
372
373
        return redirect($url);
374
    }
375
376
    /**
377
     * Get ajax response.
@@ 569-576 (lines=8) @@
566
     *
567
     * @return \Illuminate\Http\RedirectResponse
568
     */
569
    protected function redirectAfterUpdate()
570
    {
571
        admin_toastr(trans('admin.update_succeeded'));
572
573
        $url = Input::get(Builder::PREVIOUS_URL_KEY) ?: $this->resource(-1);
574
575
        return redirect($url);
576
    }
577
578
    /**
579
     * Check if request is from editable.