Category : laravel-artisan

hi guys I need help for this case I can’t run laravel 5.7 on php8, when I do "php artisan serve" I got error: thrown in /var/www/html/myProject/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 838 PHP Fatal error: Uncaught ErrorException: Method ReflectionParameter::getClass() is deprecated in /var/www/html/myProject/vendor/laravel/framework/src/Illuminate/Container/Container.php:838 I have tried to update composer required php version form "^7.1.3" to "php": "^7.1.3|^8.0", ..

Read more

I need to create a number of files in a specific format. So I planned to create a generate command by extending GeneratorCommand. I want to create view files and view-config files in application root directory. The problem is, I did not find any official doc to do so. There are some article in the ..

Read more

I make a command to run routes from it. Like this one: php artisan command:call –csrf=GCivIRtxYzHACOqJr3sasdasdGBJhR7q5X65VLv51K7 –user_id=1 –method=POST –path=/firms/load –data='{"id":2213}’ In a command i make: Auth::loginUsingId($this->option(‘user_id’)); $params = json_decode($this->option(‘data’), true); if (!is_array($params)) {$params = [];} $params[‘_token’] = $this->option(‘csrf’); $request = Request::create($this->option(‘path’), $this->option(‘method’), $params, [‘XSRF-TOKEN’ => $this->option(‘csrf’)]); $request->headers->set(‘Authorization’, $this->option(‘csrf’)); $response = app()->handle($request)->getContent(); echo $response; But every ..

Read more

This is a completely fresh installation of Laravel (because i was hoping that would fix the issue), which now makes it version 8.40.00. And to run it, i go through sail, by doing: ./vendor/bin/sail up -d. Even though the initial .env file has database credentials which don’t work (sail:password), the database connection works after quickly ..

Read more

I am using this function to create a fresh database tables public function new_migration(){ if(App::environment(‘demo’)){ try { Artisan::call(‘cache:clear’); Artisan::call(‘route:clear’); Artisan::call(‘config:clear’); Artisan::call(‘view:clear’); Artisan::call(‘migrate:fresh’, [ ‘–seed’ => true, ]); echo ‘New migrations done!’; } catch (Exception $e) { Response::make($e->getMessage(), 500); } }else{ App::abort(404); } } Which throws this error IlluminateDatabaseQueryException SQLSTATE[42S02]: Base table or view not found: ..

Read more

[SOLVED] i new to Laravel and PHP. i tried to migrate my own migrations but i can’t. this my laravel and php information: my php info PHP 8.0.3 (cli) (built: Mar 4 2021 05:33:14) ( NTS ) Composer version 2.0.11 2021-02-24 Laravel 8.x mysql Server version: 10.5.9-MariaDB Arch Linux my OS info uname: Linux ali ..

Read more

I’m hosting a laravel page on aws elastic beanstalk. For queueing I’m using SQS. I want to execute nohup php artisan queue:work –daemon > /dev/null 2>&1 & on the server by writing it into my init.config file in the .ebextensions folder. Now this works once: After the code is deployed every message in the queue ..

Read more

hello am using this url http://127.0.0.1:8000/admin/login to access admin login but it gave error InvalidArgumentException Auth guard [admin] is not defined this is auth.php paste.ofcode.org/tYvKwb86vaQCMDt5Wnw9at web.php: Auth::routes(); Route::get(‘/home’, [AppHttpControllersHomeController::class, ‘index’])->name(‘home’); Route::group([‘prefix’=>’admin’], function() { Route::group([‘middleware’=>’guest:admin’], function() { Route::view(‘login’, ‘admin.login’)->name(‘admin.login’); Route::post(‘login’, [AppHttpControllersHomeController::class, ‘authecticate’])->name(‘admin.auth’); }); Route::group([‘middleware’=>’admin.auth’], function() { Route::view(‘dashboard’, ‘admin.home’)->name(‘home’); }); }); kernel.php: protected $routeMiddleware = [ ‘auth’ ..

Read more

I wished create model call the laravel artisan tinker. so I try execute php tinker .. but AppUser command was occurred error. I don’t know. what should I do? My development enviroment vagrant php 8.* laravel 8.* enter image description here enter image description here >>> $user = AppUser::create ([‘name’ => ‘rin’, ’email’ => ‘[email protected]’, ..

Read more

PHP Warning: require(C:UsersKrUpAfreeCodeGram/vendor/autoload.php): Failed to open stream: No such file or directory in C:UsersKrUpAfreeCodeGramartisan on line 18 PHP Fatal error: Uncaught Error: Failed opening required ‘C:UsersKrUpAfreeCodeGram/vendor/autoload.php’ (include_path=’.;C:phppear’) in C:UsersKrUpAfreeCodeGramartisan:18 Stack trace: #0 {main} thrown in C:UsersKrUpAfreeCodeGramartisan on line 18 Sourc..

Read more

I have a new laravel 8 installation which I have changed the index directory to the based_path() directory. That is the root folder of fresh laravel installation. Now whenever I run php artisan serve It says that the $_SERVER[‘DOCUMENT_ROOT’] is the same as laravel public_path. But when I use the default php -S 127.0.0.1:8000 I ..

Read more

Laravel Artisan Schedulers configured in app/console/kernel.php are not Creating Mutex files, thus WithoutOverlapping never working. However I never get errors. Those files are supposed to be at storage/frameworks/ right? Due to overlaps of Artisan Commands, my data geting duplicated. Sample commands written in kernel.php : $schedule->command(‘clear:logFiles’)->everyMinute()->withoutOverlapping(); $schedule->command(‘validate:sslCommerzTransactions’)->withoutOverlapping()->everyTenMinutes(); $schedule->command(‘send:queuedTelegramNotifications’)->withoutOverlapping()->everyMinute(); $schedule->command(‘send:queuedRewardNotifications’)->withoutOverlapping()->everyMinute(); I also made a custom function ..

Read more

I have a table in my db named affilaite. But when i try to create a new table named as product it gives me an error php artisan make:migration create_product_table PHP Fatal error: Cannot declare class CreateAffiliateTable, because the name is already in use in /home/manak/Desktop/manu/Edolve/database/migrations/2021_03_09_063908_create_affiliate_table.php on line 7 SymfonyComponentErrorHandlerErrorFatalError Cannot declare class CreateAffiliateTable, because ..

Read more

Good afternoon, I am making a website on e-commerce. And it allows me to add products and everything. But when I want to see my product list in admin panel and main page, I get two errors. Error number one: Trying to get property ‘status’ of non-object (View: C:xampphtdocsAplicaciones Web Para I4.0Tecnologia ExpressresourcesviewsfrontEndindex.blade.php) Code where ..

Read more

When i run "php artisan serve" command. I am giving below error. PHP Warning: require(/home/saide/Desktop/Saide_web_app/vendor/autoload.php): failed to open stream: No such file or directory in /home/saide/Desktop/Saide_web_app/artisan on line 18 PHP Fatal error: require(): Failed opening required ‘/home/saide/Desktop/Saide_web_app/vendor/autoload.php’ (include_path=’.:/usr/share/php’) in /home/saide/Desktop/Saide_web_app/artisan on line 18 How can i solve this problem ? Sourc..

Read more