Esempio n. 1
0
        }
    }
    throw new NotFoundHttpException();
});
Route::bind('category', function ($value) {
    if (Auth::check()) {
        $object = Category::where('id', $value)->where('user_id', Auth::user()->id)->first();
        if ($object) {
            return $object;
        }
    }
    throw new NotFoundHttpException();
});
Route::bind('tag', function ($value) {
    if (Auth::check()) {
        $object = Tag::where('id', $value)->where('user_id', Auth::user()->id)->first();
        if ($object) {
            return $object;
        }
    }
    throw new NotFoundHttpException();
});
/**
 * Auth\AuthController
 */
Route::get('/register', ['uses' => 'Auth\\AuthController@getRegister', 'as' => 'register']);
Route::get('/cron/sendgrid', ['uses' => 'CronController@sendgrid']);
Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);
Route::group(['middleware' => ['auth', 'range']], function () {
    /**
     * Home Controller
 /**
  * @covers FireflyIII\Repositories\Tag\TagRepository::destroy
  */
 public function testDestroy()
 {
     $tag = FactoryMuffin::create('FireflyIII\\Models\\Tag');
     $this->object->destroy($tag);
     $this->assertCount(0, Tag::where('id', $tag->id)->whereNull('deleted_at')->get());
 }