private static function instance() { $name = static::factory(); if (false === App::has($name)) { throw new Exception("You must define " . $name . " app before use it."); } return App::make($name); }