| Type | Name | Size | Permissions | Actions |
|---|---|---|---|---|
| 📁 | .git | - | drwxrwxrwx | |
| 📁 | .well-known | - | drwxr-x--- | |
| 📁 | app | - | drwxrwxrwx | |
| 📁 | assets | - | drwxrwxrwx | |
| 📁 | bootstrap | - | drwxrwxrwx | |
| 📁 | config | - | drwxrwxrwx | |
| 📁 | css | - | drwxrwxrwx | |
| 📁 | database | - | drwxrwxrwx | |
| 📁 | favicon | - | drwxrwxrwx | |
| 📁 | js | - | drwxrwxrwx | |
| 📁 | public | - | drwxrwxrwx | |
| 📁 | resources | - | drwxrwxrwx | |
| 📁 | routes | - | drwxrwxrwx | |
| 📁 | storage | - | drwxrwxrwx | |
| 📁 | tests | - | drwxrwxrwx | |
| 📁 | vendor | - | drwxrwxrwx | |
| 📄 | .editorconfig | 258 B | -rw-rw-r-- | |
| 📄 | .env | 976 B | -rwxrwxrwx | |
| 📄 | .env.example | 899 B | -rw-rw-r-- | |
| 📄 | .gitattributes | 152 B | -rw-rw-r-- | |
| 📄 | .gitignore | 207 B | -rw-rw-r-- | |
| 📄 | .htaccess | 1015 B | -rwxrwxrwx | |
| 📄 | .styleci.yml | 194 B | -rw-rw-r-- | |
| 📄 | README.md | 3.87 KB | -rw-rw-r-- | |
| 📄 | ads.txt | 58 B | -rw-rw-r-- | |
| 📄 | artisan | 1.65 KB | -rw-rw-r-- | |
| 📄 | class.php | 2.25 KB | -rw-r--r-- | |
| 📄 | composer.json | 1.9 KB | -rw-rw-r-- | |
| 📄 | composer.lock | 326.48 KB | -rw-rw-r-- | |
| 📄 | favicon.ico | 14.73 KB | -rwxrwxrwx | |
| 📄 | index.php | 1.75 KB | -rwxrwxrwx | |
| 📄 | lndex.php | 1.04 KB | -rwxrwxrwx | |
| 📄 | package-lock.json | 745.51 KB | -rw-rw-r-- | |
| 📄 | package.json | 746 B | -rw-rw-r-- | |
| 📄 | phpunit.xml | 1.17 KB | -rw-rw-r-- | |
| 📄 | robots.txt | 713 B | -rwxrwxrwx | |
| 📄 | server.php | 571 B | -rw-rw-r-- | |
| 📄 | sitemap.xml | 1.53 KB | -rw-r--r-- | |
| 📄 | sitemap_articles.xml | 682 B | -rw-r--r-- | |
| 📄 | sitemap_tags.xml | 36.87 KB | -rw-r--r-- | |
| 📄 | style.php | 26 B | -rw-r--r-- | |
| 📄 | tatus | 8 KB | -rw-rw-r-- | |
| 📄 | webpack.mix.js | 1000 B | -rw-rw-r-- | |
| 📄 | xw.zip | 2.85 KB | -rw-r--r-- |
// If an exception occurs when attempting to run a query, we'll format the error // message to include the bindings with SQL, which will make this exception a // lot more helpful to the developer instead of just the database's errors. catch (Exception $e) { throw new QueryException( $query, $this->prepareBindings($bindings), $e ); } } protected function tryAgainIfCausedByLostConnection(QueryException $e, $query, $bindings, Closure $callback) { if ($this->causedByLostConnection($e->getPrevious())) { $this->reconnect(); return $this->runQueryCallback($query, $bindings, $callback); } throw $e; } if ($this->transactions >= 1) { throw $e; } return $this->tryAgainIfCausedByLostConnection( $e, $query, $bindings, $callback ); } /** * Handle a query exception that occurred during query execution. // to re-establish connection and re-run the query with a fresh connection. try { $result = $this->runQueryCallback($query, $bindings, $callback); } catch (QueryException $e) { $result = $this->handleQueryException( $e, $query, $bindings, $callback ); } // Once we have run the query we will calculate the time that it took to run and // then log the query, bindings, and execution time so we will report them on $this->bindValues($statement, $this->prepareBindings($bindings)); $statement->execute(); return $statement->fetchAll(); }); } /** * Run a select statement against the database and returns a generator. * public function hasTable($table) { $table = $this->connection->getTablePrefix().$table; return count($this->connection->select( $this->grammar->compileTableExists(), [$this->connection->getDatabaseName(), $table] )) > 0; } /** * Get the column listing for a given table. if (! $instance) { throw new RuntimeException('A facade root has not been set.'); } return $instance->$method(...$args); }}// this function to check if the table car active or not // here it will be check the first items in the car table function check_if_cars_active(){ if (Schema::hasTable('cars')){ $firstRow = Car::first(); if($firstRow){ return $firstRow->active; } } Route::group(['prefix' => 'cars'], function () { Route::get('/',[CarsController::class ,'index']) -> name('admin.cars'); // active or deactive car table Route::get ('deactive-car-table',[CarsController::class ,'deactive_car_table']) -> name('deactive-car-table'); if(check_if_cars_active() === 1){ Route::get('create',[CarsController::class ,'create']) -> name('admin.cars.create'); Route::post('store',[CarsController::class ,'store']) -> name('admin.cars.store'); Route::get('edit/{id}',[CarsController::class ,'edit']) -> name('admin.cars.edit'); Route::post('update/{id}',[CarsController::class ,'update']) -> name('admin.cars.update'); Route::get('delete/{id}',[CarsController::class ,'destroy']) -> name('admin.cars.delete'); * @return void */ protected function loadRoutes($routes) { if ($routes instanceof Closure) { $routes($this); } else { (new RouteFileRegistrar($this))->register($routes); } } $this->updateGroupStack($attributes); // Once we have updated the group stack, we'll load the provided routes and // merge in the group's attributes when the routes are created. After we // have created the routes, we will pop the attributes off the stack. $this->loadRoutes($routes); array_pop($this->groupStack); } /** if (! $instance) { throw new RuntimeException('A facade root has not been set.'); } return $instance->$method(...$args); }} // insert_all_tags_to_one_car Route::post('insert',[CarsController::class ,'insert_all_tags_to_one_car']) -> name('insert-all-tags-to-one-car'); //delete_all_tags_of_one_car Route::get ('delete-tags/{id}',[CarsController::class ,'delete_all_tags_of_one_car']) -> name('delete-all-tags-of-one-car'); } }); ############################# End Cars Route ################################ ###################### Brgin Sub Cars Route ############################### Route::group(['prefix' => 'sub-cars'], function () { * @return void */ protected function loadRoutes($routes) { if ($routes instanceof Closure) { $routes($this); } else { (new RouteFileRegistrar($this))->register($routes); } } $this->updateGroupStack($attributes); // Once we have updated the group stack, we'll load the provided routes and // merge in the group's attributes when the routes are created. After we // have created the routes, we will pop the attributes off the stack. $this->loadRoutes($routes); array_pop($this->groupStack); } /** if (! $instance) { throw new RuntimeException('A facade root has not been set.'); } return $instance->$method(...$args); }} abort(404); }); //Eind redirects Route });############################# End admin Dashboard Route ###############################Route::get('logout', '\App\Http\Controllers\Auth\LoginController@logout');// Disable Auth Register route and also you need to chane the middelware in the app\Http\Controllers\Auth\RegisterController.php */ public function register($routes) { $router = $this->router; require $routes; }} protected function loadRoutes($routes) { if ($routes instanceof Closure) { $routes($this); } else { (new RouteFileRegistrar($this))->register($routes); } } /** * Get the prefix from the last group on the stack. $this->updateGroupStack($attributes); // Once we have updated the group stack, we'll load the provided routes and // merge in the group's attributes when the routes are created. After we // have created the routes, we will pop the attributes off the stack. $this->loadRoutes($routes); array_pop($this->groupStack); } /** * @param \Closure|string $callback * @return void */ public function group($callback) { $this->router->group($this->attributes, $callback); } /** * Register a new route with the given verbs. * ->group(base_path('routes/web.php')); //This is new Route for admin panel Route::middleware('web') ->namespace($this->namespace) ->group(base_path('routes/admin.php')); //This is new Route for site panel Route::middleware('web') ->namespace($this->namespace) ->group(base_path('routes/site.php')); }); if (static::isCallableWithAtSign($callback) || $defaultMethod) { return static::callClass($container, $callback, $parameters, $defaultMethod); } return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) { return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters))); }); } /** * Call a string reference to a class using Class@method syntax. * @param mixed $value * @return mixed */ public static function unwrapIfClosure($value) { return $value instanceof Closure ? $value() : $value; } /** * Get the class name of the given parameter's type, if possible. * * @return mixed */ protected static function callBoundMethod($container, $callback, $default) { if (! is_array($callback)) { return Util::unwrapIfClosure($default); } // Here we need to turn the array callable into a Class@method string we can use to // examine the container and see if there are any method bindings for this given // method. If there are, we can call this method binding callback immediately. return static::callClass($container, $callback, $parameters, $defaultMethod); } return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) { return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters))); }); } /** * Call a string reference to a class using Class@method syntax. * * * @throws \InvalidArgumentException */ public function call($callback, array $parameters = [], $defaultMethod = null) { return BoundMethod::call($this, $callback, $parameters, $defaultMethod); } /** * Get a closure to resolve the given type from the container. * * @return void */ protected function loadRoutes() { if (! is_null($this->loadRoutesUsing)) { $this->app->call($this->loadRoutesUsing); } elseif (method_exists($this, 'map')) { $this->app->call([$this, 'map']); } } $this->setRootControllerNamespace(); if ($this->routesAreCached()) { $this->loadCachedRoutes(); } else { $this->loadRoutes(); $this->app->booted(function () { $this->app['router']->getRoutes()->refreshNameLookups(); $this->app['router']->getRoutes()->refreshActionLookups(); }); if (static::isCallableWithAtSign($callback) || $defaultMethod) { return static::callClass($container, $callback, $parameters, $defaultMethod); } return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) { return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters))); }); } /** * Call a string reference to a class using Class@method syntax. * @param mixed $value * @return mixed */ public static function unwrapIfClosure($value) { return $value instanceof Closure ? $value() : $value; } /** * Get the class name of the given parameter's type, if possible. * * @return mixed */ protected static function callBoundMethod($container, $callback, $default) { if (! is_array($callback)) { return Util::unwrapIfClosure($default); } // Here we need to turn the array callable into a Class@method string we can use to // examine the container and see if there are any method bindings for this given // method. If there are, we can call this method binding callback immediately. return static::callClass($container, $callback, $parameters, $defaultMethod); } return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) { return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters))); }); } /** * Call a string reference to a class using Class@method syntax. * * * @throws \InvalidArgumentException */ public function call($callback, array $parameters = [], $defaultMethod = null) { return BoundMethod::call($this, $callback, $parameters, $defaultMethod); } /** * Get a closure to resolve the given type from the container. * public function callBootedCallbacks() { $index = 0; while ($index < count($this->bootedCallbacks)) { $this->app->call($this->bootedCallbacks[$index]); $index++; } } if (method_exists($provider, 'boot')) { $this->call([$provider, 'boot']); } $provider->callBootedCallbacks(); } /** * Register a new boot listener. * // for any listeners that need to do work after this initial booting gets // finished. This is useful when ordering the boot-up processes we run. $this->fireAppCallbacks($this->bootingCallbacks); array_walk($this->serviceProviders, function ($p) { $this->bootProvider($p); }); $this->booted = true; $this->fireAppCallbacks($this->bootedCallbacks); // finished. This is useful when ordering the boot-up processes we run. $this->fireAppCallbacks($this->bootingCallbacks); array_walk($this->serviceProviders, function ($p) { $this->bootProvider($p); }); $this->booted = true; $this->fireAppCallbacks($this->bootedCallbacks); } * @param \Illuminate\Contracts\Foundation\Application $app * @return void */ public function bootstrap(Application $app) { $app->boot(); }} $this->hasBeenBootstrapped = true; foreach ($bootstrappers as $bootstrapper) { $this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]); $this->make($bootstrapper)->bootstrap($this); $this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]); } } * @return void */ public function bootstrap() { if (! $this->app->hasBeenBootstrapped()) { $this->app->bootstrapWith($this->bootstrappers()); } } /** * Get the route dispatcher callback. { $this->app->instance('request', $request); Facade::clearResolvedInstance('request'); $this->bootstrap(); return (new Pipeline($this->app)) ->send($request) ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware) ->then($this->dispatchToRouter()); public function handle($request) { try { $request->enableHttpMethodParameterOverride(); $response = $this->sendRequestThroughRouter($request); } catch (Throwable $e) { $this->reportException($e); $response = $this->renderException($request, $e); }$app = require_once __DIR__ . '/bootstrap/app.php';$kernel = $app->make(Kernel::class);$response = $kernel->handle( $request = Request::capture())->send();$kernel->terminate($request, $response); { if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) { return new PDOConnection($dsn, $username, $password, $options); } return new PDO($dsn, $username, $password, $options); } /** * Determine if the connection is persistent. * { if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) { return new PDOConnection($dsn, $username, $password, $options); } return new PDO($dsn, $username, $password, $options); } /** * Determine if the connection is persistent. * * @throws \Exception */ protected function tryAgainIfCausedByLostConnection(Throwable $e, $dsn, $username, $password, $options) { if ($this->causedByLostConnection($e)) { return $this->createPdoConnection($dsn, $username, $password, $options); } throw $e; } return $this->createPdoConnection( $dsn, $username, $password, $options ); } catch (Exception $e) { return $this->tryAgainIfCausedByLostConnection( $e, $dsn, $username, $password, $options ); } } /** $options = $this->getOptions($config); // We need to grab the PDO options that should be used while making the brand // new connection instance. The PDO options control various aspects of the // connection's behavior, and some might be specified by the developers. $connection = $this->createConnection($dsn, $config, $options); if (! empty($config['database'])) { $connection->exec("use `{$config['database']}`;"); } return function () use ($config) { foreach (Arr::shuffle($hosts = $this->parseHosts($config)) as $key => $host) { $config['host'] = $host; try { return $this->createConnector($config)->connect($config); } catch (PDOException $e) { continue; } } * @return \PDO */ public function getPdo() { if ($this->pdo instanceof Closure) { return $this->pdo = call_user_func($this->pdo); } return $this->pdo; } if ($this->readPdo instanceof Closure) { return $this->readPdo = call_user_func($this->readPdo); } return $this->readPdo ?: $this->getPdo(); } /** * Get the current read PDO connection parameter without executing any reconnect logic. * * @param bool $useReadPdo * @return \PDO */ protected function getPdoForSelect($useReadPdo = true) { return $useReadPdo ? $this->getReadPdo() : $this->getPdo(); } /** * Run an insert statement against the database. * // For select statements, we'll simply execute the query and return an array // of the database result set. Each element in the array will be a single // row from the database table, and will either be an array or objects. $statement = $this->prepared( $this->getPdoForSelect($useReadPdo)->prepare($query) ); $this->bindValues($statement, $this->prepareBindings($bindings)); $statement->execute(); { // To execute the statement, we'll simply call the callback, which will actually // run the SQL against the PDO connection. Then we can calculate the time it // took to execute and log the query SQL, bindings and time in our memory. try { return $callback($query, $bindings); } // If an exception occurs when attempting to run a query, we'll format the error // message to include the bindings with SQL, which will make this exception a // lot more helpful to the developer instead of just the database's errors. protected function tryAgainIfCausedByLostConnection(QueryException $e, $query, $bindings, Closure $callback) { if ($this->causedByLostConnection($e->getPrevious())) { $this->reconnect(); return $this->runQueryCallback($query, $bindings, $callback); } throw $e; } if ($this->transactions >= 1) { throw $e; } return $this->tryAgainIfCausedByLostConnection( $e, $query, $bindings, $callback ); } /** * Handle a query exception that occurred during query execution. // to re-establish connection and re-run the query with a fresh connection. try { $result = $this->runQueryCallback($query, $bindings, $callback); } catch (QueryException $e) { $result = $this->handleQueryException( $e, $query, $bindings, $callback ); } // Once we have run the query we will calculate the time that it took to run and // then log the query, bindings, and execution time so we will report them on $this->bindValues($statement, $this->prepareBindings($bindings)); $statement->execute(); return $statement->fetchAll(); }); } /** * Run a select statement against the database and returns a generator. * public function hasTable($table) { $table = $this->connection->getTablePrefix().$table; return count($this->connection->select( $this->grammar->compileTableExists(), [$this->connection->getDatabaseName(), $table] )) > 0; } /** * Get the column listing for a given table. if (! $instance) { throw new RuntimeException('A facade root has not been set.'); } return $instance->$method(...$args); }}// this function to check if the table car active or not // here it will be check the first items in the car table function check_if_cars_active(){ if (Schema::hasTable('cars')){ $firstRow = Car::first(); if($firstRow){ return $firstRow->active; } } Route::group(['prefix' => 'cars'], function () { Route::get('/',[CarsController::class ,'index']) -> name('admin.cars'); // active or deactive car table Route::get ('deactive-car-table',[CarsController::class ,'deactive_car_table']) -> name('deactive-car-table'); if(check_if_cars_active() === 1){ Route::get('create',[CarsController::class ,'create']) -> name('admin.cars.create'); Route::post('store',[CarsController::class ,'store']) -> name('admin.cars.store'); Route::get('edit/{id}',[CarsController::class ,'edit']) -> name('admin.cars.edit'); Route::post('update/{id}',[CarsController::class ,'update']) -> name('admin.cars.update'); Route::get('delete/{id}',[CarsController::class ,'destroy']) -> name('admin.cars.delete'); * @return void */ protected function loadRoutes($routes) { if ($routes instanceof Closure) { $routes($this); } else { (new RouteFileRegistrar($this))->register($routes); } } $this->updateGroupStack($attributes); // Once we have updated the group stack, we'll load the provided routes and // merge in the group's attributes when the routes are created. After we // have created the routes, we will pop the attributes off the stack. $this->loadRoutes($routes); array_pop($this->groupStack); } /** if (! $instance) { throw new RuntimeException('A facade root has not been set.'); } return $instance->$method(...$args); }} // insert_all_tags_to_one_car Route::post('insert',[CarsController::class ,'insert_all_tags_to_one_car']) -> name('insert-all-tags-to-one-car'); //delete_all_tags_of_one_car Route::get ('delete-tags/{id}',[CarsController::class ,'delete_all_tags_of_one_car']) -> name('delete-all-tags-of-one-car'); } }); ############################# End Cars Route ################################ ###################### Brgin Sub Cars Route ############################### Route::group(['prefix' => 'sub-cars'], function () { * @return void */ protected function loadRoutes($routes) { if ($routes instanceof Closure) { $routes($this); } else { (new RouteFileRegistrar($this))->register($routes); } } $this->updateGroupStack($attributes); // Once we have updated the group stack, we'll load the provided routes and // merge in the group's attributes when the routes are created. After we // have created the routes, we will pop the attributes off the stack. $this->loadRoutes($routes); array_pop($this->groupStack); } /** if (! $instance) { throw new RuntimeException('A facade root has not been set.'); } return $instance->$method(...$args); }} abort(404); }); //Eind redirects Route });############################# End admin Dashboard Route ###############################Route::get('logout', '\App\Http\Controllers\Auth\LoginController@logout');// Disable Auth Register route and also you need to chane the middelware in the app\Http\Controllers\Auth\RegisterController.php */ public function register($routes) { $router = $this->router; require $routes; }} protected function loadRoutes($routes) { if ($routes instanceof Closure) { $routes($this); } else { (new RouteFileRegistrar($this))->register($routes); } } /** * Get the prefix from the last group on the stack. $this->updateGroupStack($attributes); // Once we have updated the group stack, we'll load the provided routes and // merge in the group's attributes when the routes are created. After we // have created the routes, we will pop the attributes off the stack. $this->loadRoutes($routes); array_pop($this->groupStack); } /** * @param \Closure|string $callback * @return void */ public function group($callback) { $this->router->group($this->attributes, $callback); } /** * Register a new route with the given verbs. * ->group(base_path('routes/web.php')); //This is new Route for admin panel Route::middleware('web') ->namespace($this->namespace) ->group(base_path('routes/admin.php')); //This is new Route for site panel Route::middleware('web') ->namespace($this->namespace) ->group(base_path('routes/site.php')); }); if (static::isCallableWithAtSign($callback) || $defaultMethod) { return static::callClass($container, $callback, $parameters, $defaultMethod); } return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) { return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters))); }); } /** * Call a string reference to a class using Class@method syntax. * @param mixed $value * @return mixed */ public static function unwrapIfClosure($value) { return $value instanceof Closure ? $value() : $value; } /** * Get the class name of the given parameter's type, if possible. * * @return mixed */ protected static function callBoundMethod($container, $callback, $default) { if (! is_array($callback)) { return Util::unwrapIfClosure($default); } // Here we need to turn the array callable into a Class@method string we can use to // examine the container and see if there are any method bindings for this given // method. If there are, we can call this method binding callback immediately. return static::callClass($container, $callback, $parameters, $defaultMethod); } return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) { return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters))); }); } /** * Call a string reference to a class using Class@method syntax. * * * @throws \InvalidArgumentException */ public function call($callback, array $parameters = [], $defaultMethod = null) { return BoundMethod::call($this, $callback, $parameters, $defaultMethod); } /** * Get a closure to resolve the given type from the container. * * @return void */ protected function loadRoutes() { if (! is_null($this->loadRoutesUsing)) { $this->app->call($this->loadRoutesUsing); } elseif (method_exists($this, 'map')) { $this->app->call([$this, 'map']); } } $this->setRootControllerNamespace(); if ($this->routesAreCached()) { $this->loadCachedRoutes(); } else { $this->loadRoutes(); $this->app->booted(function () { $this->app['router']->getRoutes()->refreshNameLookups(); $this->app['router']->getRoutes()->refreshActionLookups(); }); if (static::isCallableWithAtSign($callback) || $defaultMethod) { return static::callClass($container, $callback, $parameters, $defaultMethod); } return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) { return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters))); }); } /** * Call a string reference to a class using Class@method syntax. * @param mixed $value * @return mixed */ public static function unwrapIfClosure($value) { return $value instanceof Closure ? $value() : $value; } /** * Get the class name of the given parameter's type, if possible. * * @return mixed */ protected static function callBoundMethod($container, $callback, $default) { if (! is_array($callback)) { return Util::unwrapIfClosure($default); } // Here we need to turn the array callable into a Class@method string we can use to // examine the container and see if there are any method bindings for this given // method. If there are, we can call this method binding callback immediately. return static::callClass($container, $callback, $parameters, $defaultMethod); } return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) { return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters))); }); } /** * Call a string reference to a class using Class@method syntax. * * * @throws \InvalidArgumentException */ public function call($callback, array $parameters = [], $defaultMethod = null) { return BoundMethod::call($this, $callback, $parameters, $defaultMethod); } /** * Get a closure to resolve the given type from the container. * public function callBootedCallbacks() { $index = 0; while ($index < count($this->bootedCallbacks)) { $this->app->call($this->bootedCallbacks[$index]); $index++; } } if (method_exists($provider, 'boot')) { $this->call([$provider, 'boot']); } $provider->callBootedCallbacks(); } /** * Register a new boot listener. * // for any listeners that need to do work after this initial booting gets // finished. This is useful when ordering the boot-up processes we run. $this->fireAppCallbacks($this->bootingCallbacks); array_walk($this->serviceProviders, function ($p) { $this->bootProvider($p); }); $this->booted = true; $this->fireAppCallbacks($this->bootedCallbacks); // finished. This is useful when ordering the boot-up processes we run. $this->fireAppCallbacks($this->bootingCallbacks); array_walk($this->serviceProviders, function ($p) { $this->bootProvider($p); }); $this->booted = true; $this->fireAppCallbacks($this->bootedCallbacks); } * @param \Illuminate\Contracts\Foundation\Application $app * @return void */ public function bootstrap(Application $app) { $app->boot(); }} $this->hasBeenBootstrapped = true; foreach ($bootstrappers as $bootstrapper) { $this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]); $this->make($bootstrapper)->bootstrap($this); $this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]); } } * @return void */ public function bootstrap() { if (! $this->app->hasBeenBootstrapped()) { $this->app->bootstrapWith($this->bootstrappers()); } } /** * Get the route dispatcher callback. { $this->app->instance('request', $request); Facade::clearResolvedInstance('request'); $this->bootstrap(); return (new Pipeline($this->app)) ->send($request) ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware) ->then($this->dispatchToRouter()); public function handle($request) { try { $request->enableHttpMethodParameterOverride(); $response = $this->sendRequestThroughRouter($request); } catch (Throwable $e) { $this->reportException($e); $response = $this->renderException($request, $e); }$app = require_once __DIR__ . '/bootstrap/app.php';$kernel = $app->make(Kernel::class);$response = $kernel->handle( $request = Request::capture())->send();$kernel->terminate($request, $response);|
[2/2]
QueryException
|
|---|
Illuminate\Database\QueryException:
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = sa-4sale and table_name = cars and table_type = 'BASE TABLE')
at /home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
at Illuminate\Database\Connection->runQueryCallback()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:784)
at Illuminate\Database\Connection->tryAgainIfCausedByLostConnection()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:764)
at Illuminate\Database\Connection->handleQueryException()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:675)
at Illuminate\Database\Connection->run()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:376)
at Illuminate\Database\Connection->select()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php:44)
at Illuminate\Database\Schema\MySqlBuilder->hasTable()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:261)
at Illuminate\Support\Facades\Facade::__callStatic()
(/home/sa-4sale/htdocs/sa-4sale.com/app/Helpers/General.php:238)
at check_if_cars_active()
(/home/sa-4sale/htdocs/sa-4sale.com/routes/admin.php:58)
at Illuminate\Routing\RouteFileRegistrar->{closure}()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php:423)
at Illuminate\Routing\Router->loadRoutes()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php:382)
at Illuminate\Routing\Router->group()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:261)
at Illuminate\Support\Facades\Facade::__callStatic()
(/home/sa-4sale/htdocs/sa-4sale.com/routes/admin.php:71)
at Illuminate\Routing\RouteFileRegistrar->{closure}()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php:423)
at Illuminate\Routing\Router->loadRoutes()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php:382)
at Illuminate\Routing\Router->group()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:261)
at Illuminate\Support\Facades\Facade::__callStatic()
(/home/sa-4sale/htdocs/sa-4sale.com/routes/admin.php:364)
at require('/home/sa-4sale/htdocs/sa-4sale.com/routes/admin.php')
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Routing/RouteFileRegistrar.php:35)
at Illuminate\Routing\RouteFileRegistrar->register()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php:425)
at Illuminate\Routing\Router->loadRoutes()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php:382)
at Illuminate\Routing\Router->group()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Routing/RouteRegistrar.php:163)
at Illuminate\Routing\RouteRegistrar->group()
(/home/sa-4sale/htdocs/sa-4sale.com/app/Providers/RouteServiceProvider.php:53)
at App\Providers\RouteServiceProvider->App\Providers\{closure}()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36)
at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/Util.php:40)
at Illuminate\Container\Util::unwrapIfClosure()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:81)
at Illuminate\Container\BoundMethod::callBoundMethod()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37)
at Illuminate\Container\BoundMethod::call()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/Container.php:653)
at Illuminate\Container\Container->call()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php:120)
at Illuminate\Foundation\Support\Providers\RouteServiceProvider->loadRoutes()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php:45)
at Illuminate\Foundation\Support\Providers\RouteServiceProvider->Illuminate\Foundation\Support\Providers\{closure}()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36)
at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/Util.php:40)
at Illuminate\Container\Util::unwrapIfClosure()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:81)
at Illuminate\Container\BoundMethod::callBoundMethod()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37)
at Illuminate\Container\BoundMethod::call()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/Container.php:653)
at Illuminate\Container\Container->call()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php:119)
at Illuminate\Support\ServiceProvider->callBootedCallbacks()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:929)
at Illuminate\Foundation\Application->bootProvider()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:907)
at Illuminate\Foundation\Application->Illuminate\Foundation\{closure}()
at array_walk()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:908)
at Illuminate\Foundation\Application->boot()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17)
at Illuminate\Foundation\Bootstrap\BootProviders->bootstrap()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:237)
at Illuminate\Foundation\Application->bootstrapWith()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:153)
at Illuminate\Foundation\Http\Kernel->bootstrap()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:137)
at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:111)
at Illuminate\Foundation\Http\Kernel->handle()
(/home/sa-4sale/htdocs/sa-4sale.com/index.php:53)
|
|
[1/2]
PDOException
|
|---|
PDOException:
SQLSTATE[HY000] [2002] Connection refused
at /home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
at PDO->__construct()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70)
at Illuminate\Database\Connectors\Connector->createPdoConnection()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:100)
at Illuminate\Database\Connectors\Connector->tryAgainIfCausedByLostConnection()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:50)
at Illuminate\Database\Connectors\Connector->createConnection()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php:24)
at Illuminate\Database\Connectors\MySqlConnector->connect()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:184)
at Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connectors\{closure}()
at call_user_func()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:1064)
at Illuminate\Database\Connection->getPdo()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:1100)
at Illuminate\Database\Connection->getReadPdo()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:442)
at Illuminate\Database\Connection->getPdoForSelect()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:368)
at Illuminate\Database\Connection->Illuminate\Database\{closure}()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:705)
at Illuminate\Database\Connection->runQueryCallback()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:784)
at Illuminate\Database\Connection->tryAgainIfCausedByLostConnection()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:764)
at Illuminate\Database\Connection->handleQueryException()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:675)
at Illuminate\Database\Connection->run()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:376)
at Illuminate\Database\Connection->select()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php:44)
at Illuminate\Database\Schema\MySqlBuilder->hasTable()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:261)
at Illuminate\Support\Facades\Facade::__callStatic()
(/home/sa-4sale/htdocs/sa-4sale.com/app/Helpers/General.php:238)
at check_if_cars_active()
(/home/sa-4sale/htdocs/sa-4sale.com/routes/admin.php:58)
at Illuminate\Routing\RouteFileRegistrar->{closure}()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php:423)
at Illuminate\Routing\Router->loadRoutes()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php:382)
at Illuminate\Routing\Router->group()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:261)
at Illuminate\Support\Facades\Facade::__callStatic()
(/home/sa-4sale/htdocs/sa-4sale.com/routes/admin.php:71)
at Illuminate\Routing\RouteFileRegistrar->{closure}()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php:423)
at Illuminate\Routing\Router->loadRoutes()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php:382)
at Illuminate\Routing\Router->group()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:261)
at Illuminate\Support\Facades\Facade::__callStatic()
(/home/sa-4sale/htdocs/sa-4sale.com/routes/admin.php:364)
at require('/home/sa-4sale/htdocs/sa-4sale.com/routes/admin.php')
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Routing/RouteFileRegistrar.php:35)
at Illuminate\Routing\RouteFileRegistrar->register()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php:425)
at Illuminate\Routing\Router->loadRoutes()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php:382)
at Illuminate\Routing\Router->group()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Routing/RouteRegistrar.php:163)
at Illuminate\Routing\RouteRegistrar->group()
(/home/sa-4sale/htdocs/sa-4sale.com/app/Providers/RouteServiceProvider.php:53)
at App\Providers\RouteServiceProvider->App\Providers\{closure}()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36)
at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/Util.php:40)
at Illuminate\Container\Util::unwrapIfClosure()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:81)
at Illuminate\Container\BoundMethod::callBoundMethod()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37)
at Illuminate\Container\BoundMethod::call()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/Container.php:653)
at Illuminate\Container\Container->call()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php:120)
at Illuminate\Foundation\Support\Providers\RouteServiceProvider->loadRoutes()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php:45)
at Illuminate\Foundation\Support\Providers\RouteServiceProvider->Illuminate\Foundation\Support\Providers\{closure}()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36)
at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/Util.php:40)
at Illuminate\Container\Util::unwrapIfClosure()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:81)
at Illuminate\Container\BoundMethod::callBoundMethod()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37)
at Illuminate\Container\BoundMethod::call()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Container/Container.php:653)
at Illuminate\Container\Container->call()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php:119)
at Illuminate\Support\ServiceProvider->callBootedCallbacks()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:929)
at Illuminate\Foundation\Application->bootProvider()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:907)
at Illuminate\Foundation\Application->Illuminate\Foundation\{closure}()
at array_walk()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:908)
at Illuminate\Foundation\Application->boot()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17)
at Illuminate\Foundation\Bootstrap\BootProviders->bootstrap()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:237)
at Illuminate\Foundation\Application->bootstrapWith()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:153)
at Illuminate\Foundation\Http\Kernel->bootstrap()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:137)
at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
(/home/sa-4sale/htdocs/sa-4sale.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:111)
at Illuminate\Foundation\Http\Kernel->handle()
(/home/sa-4sale/htdocs/sa-4sale.com/index.php:53)
|