#### Category : php

After intalling Docker on windows and setting some settings for that. after opening firefox and locating localhost its take a long time to opening my web application which i should see on browser. as far i installed Ubuntu linux from windows store i’m not sure my projects should be placed on that or not. without ..

I host an Apache PHP server on which there’s a couple of websites. Let’s call these X and Y. After I cleared the cache (and made some changes) on both my laravel websites, I get the following error often: [previous exception] [object] (PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘Y.events_ip’ doesn’t ..

I’m looking for an answer. Laravel Framework 5.5.44 and I have a queue that will send an email whenever someone place new order on my website. I used event and listener to accomplish this. My queue successfully sent the email but my locale code does not working. Below is my code : NewOrderListener.php public function ..

I am currently trying to setup the Twinfield API, it should be pretty straight forward when using the php-twinfield/twinfield library. But there is one thing I don’t fully understand. Here is my code: $provider = new OAuthProvider([ ‘clientId’ => ‘someClientId’, ‘clientSecret’ => ‘someClientSecret’, ‘redirectUri’ => ‘https://example.org/’ ]);$accessToken = $provider->getAccessToken("authorization_code", ["code" => …]);$refreshToken = ..

my web.php like that Route::group([‘middleware’ => [‘auth’, ‘admin’], ‘domain’ => config(‘app.domain_admin’)], function() { Route::get(‘/’, [AppHttpControllersAdminTranslationController::class, ‘info’])->name(‘index’); Route::get(‘/paymentSys’, [AppHttpControllersAdminAdminController::class, ‘paymentSys’])->name(‘paymentSys’); Route::post(‘destroy’, [AppHttpControllersAdminAdminController::class, ‘destroy’])->name(‘destroy’); Route::get(‘index’, [AppHttpControllersAdminAdminController::class, ‘index’])->name(‘index’); Route::post(‘update/{news}’, [AppHttpControllersAdminAdminController::class, ‘update’])->name(‘update’); }); config(‘app.domain_admin’) equals to admin.paysys.ssd.uz. My admin middleware has this: public function handle(Request $request, Closure$next) { if (Auth::user() && Auth::user()->user_role == "admin") { return $next($request); } ..

Hello I’m trying to learn laravel, and I got to the point where I stumbled upon this problem in templating where the content is not showing up when using @yeild it only shows the content of the main blade file and does not display the @section in the child here is my code below, what ..

[enter image description here][1]I’m using Laravel 7x and flysystem-google-drive. i want get body to report bugs to api instead of reporting the error directly. code error i want to get: [2021-05-06 10:28:31] local.ERROR: { "error": { "errors": [ { "domain": "global", "reason": "notFound", "message": "File not found: 1S1QYxpypWItSTx8gSUVHDq-PeQeqyKt.", "locationType": "parameter", "location": "fileId" } ], "code": ..

I’m working on create a Parapharser with PHP, laravel and Vuejs, like (https://smodin.me/free-english-rewriter-and-spinner) I’m trying using a Traductor, for example, passing the introduced text from spanish to russian and return to spanish. But if i have 1 000 000 000 characters by day it’s expensive with google traductor api. Also i’ve trying to user a ..

Ok. I have three tables products –product_id –product_name –product_type_id –price –description –bonus_points –image productTypes –product_type_id –product_type_name productQuantities –id –product_id –warehouse_id –quantity Products are placed in different warehouses so I have to keep tracks of its numbers And has relationships are like this class Product extends Model { public function productType() { return $this->belongsTo(‘AppModelsProductType’,’product_type_id’,’product_type_id’); } public .. Read more I have a "jobdesk.dat" file in the "{myproject} /media/jobdesk.dat" directory Content on jobdesk.dat: Jobdesk=Andy:Desktop Programmer|Michael:Web Designer|Felix:Graphic Designer How to import this .dat file into the project and how to read or parse the content I tried with the code it didn’t work <?php$file = fopen("media/jobdesk.dat", "r") or die ("Unable to open file!"); echo fread ..

Below is a screenshot of my project. May I ask how can I allow users to upload images for the items in the table? The image wont be updated and stored immediately but will wait until the user clicks the request changes button. Users might delete some items after they upload the image and then ..

My application has the following entities: Locations Disciplines Instructors Disciplines and Instructors should be a many to many relationship, so in my Discipline model I have the following: public function instructors() { return $this->belongsToMany( Instructor::class, ‘location_discipline_instructors’, ‘discipline_id’, ‘id’ )->withPivot([‘location_id’]); } My pivot table contains the following fields: location_id discipline_id instructor_id To get a list of .. Read more I want to test how an API endpoint behaves for different users. I create three users with their corresponding JWT tokens and access the endpoint accordingly. The first one works flawlessly but the two following requests just act as if they were done by the first user. The tokens are definitely the ones for the .. Read more each time when i try to authenticate (default laravel authentification) on my laravel app, when i submit my form, i have this error : BadMethodCallException This cache store does not support tagging. I need to resfresh my browser, and it work juste fine ! I’am not able to know why or to find the error .. Read more A small piece of logic in my php code is to store a string in a database field and constantly increment it. Thus creating an array of strings. The project is in Laravel 8. After inserting a first piece of data, I have extracted it with an SQL statement, but this first returns an object .. Read more -PHP- Store a string in a database field and constantly increment. Thus creating an array of strings. The project is in Laravel 8. After inserting a first piece of data, I have extracted it with an SQL statement, but this first returns an object array with the following structure. [2021-05-05 21:38:31] local.INFO: array ( 0 .. Read more My policy for an API controller seems to be working fine for view, but returns ‘This action is unauthorized.’ for viewAll, both while sending an admin api token. Using Laravel 7 with Spatie Roles/Permissions. AppBaseController extends IlluminateRoutingController. I’ve tried it without the middleware, just to be sure. Tried commenting out the ‘before’ function, to make .. Read more I’m opened My Admin Panel via Google Chrome In Mobile but after click "Request Desktop Version" in Google Chrome Browser Redirect Route To Home Not Admin Panel Admin Panel Route ex: emaple.com/admin after click Request Desktop Version to open Admin Panel In Desktop Version in Mobile Redirect To example.com/home I’m Using Laravel Framework. Thank you. .. Read more So i would like to accomplish the a command which runs every sunday but also every 7 seconds on that sunday. The following is from the docs but I don’t have an idea on how to achieve this. Anyone able to direct me in the right direction? protected function schedule(Schedule$schedule) { $schedule->command(‘test:cron’) ->everyMinute(); } .. Read more I want to use broadcast to understand when does the job finish and use pusher,laravel-echo and redis. When I run "php artisan queue:listen redis" dd in broadcast works but nothing happens in livewire component. showMessage method not working. Broadcast public function broadcastOn() { return new Channel(‘product-channel’); } Livewire component class ProjectActions extends Component { protected .. Read more I try to do decrypt value ? But it is giving this error. The payload is invalid. use IlluminateSupportFacadesCrypt; use IlluminateContractsEncryptionDecryptException;$identity_no = "eyJpdiI6Inhzakt4SE10Mk1TbGVNakZKb29nc2c9PSIsInZhbHVlIjoiaW9tWGVhOXZaQWlCYzhBbmNrbTV3dXdQYmNrTmt1S3dHKzdqelNLcFppbVJoR2s3NmptaVlKaU4rc1NSU3F2MW1oSVlJdU9OTEJuT05w ▶"; $decrypted_identityno = Crypt::decryptString($identity_no); dd($decrypted_identityno); die(); Sourc.. Read more Hello I am going to create a project with laravel, I am using composer global installer, with the php version I am using is php 8. but I have a problem when I do the laravel installation. What should I do? Warning: require_once(phar://C:/composer/composer.phar/vendor/symfony/polyfill-mbstring/Resources/mb_convert_variables.php8): Failed to open stream: phar error: "vendor/symfony/polyfill-mbstring/Resources/mb_convert_variables.php8" is not a file in .. Read more When I start seeding my database with db:seed, I got this error: Call to a member function count() on null at P:<folderName><folderName>srcvendorlaravelframeworksrcIlluminateDatabaseEloquentFactoriesHasFactory.php:18 14▕ { 15▕$factory = static::newFactory() ?: Factory::factoryForModel(get_called_class()); 16▕ 17▕ return $factory ➜ 18▕ ->count(is_numeric($parameters[0] ?? null) ? $parameters[0] : null) 19▕ ->state(is_array($parameters[0] ?? null) ? $parameters[0] : ($parameters[1] ?? [])); 20▕ } ..