I’m a newbie with Laravel, but old school PHP developer. I’m in the process of adapting my framework to the Laravel framework. My main goal at this moment is to use eloquent queries without doing a DB schema and migration inside Laravel, as I have my database is built already, up and running. So far, I’ve bee…
Datatype date is not updating in mysql using laravel
A column named ‘Shipment’ in import_request_trackers table having the datatype of Date and initially the default value is null. But when I tried to update the column from another form manually it shows no error but the database table is not being updated. } Answer 1- check your route first, please…
Recount SQL auto increment ID while keeping the other columns intact
I have a table like this ID NAME 1 MICHAEL 2 JORDAN 5 DONALD 7 JAYCE 8 ROY 11 JOHN 16 DOE Is there a way to recount the ID from the beggining so there is a sequel and keeping the others columns intact to be like this: ID NAME 1 MICHAEL 2 JORDAN 3 DONALD 4 JAYCE 5 ROY
Failed Login with Tymon JWT Auth Laravel 8
When I try to get token with login function I get this error TypeError: Argument 1 passed to TymonJWTAuthJWTGuard::login() must be an instance of TymonJWTAuthContractsJWTSubject, instance of AppModelsUser given, called in …vendortymonjwt-authsrcJWTGuard.php on line 127 in file …vendortymonjwt-auth…
SQL – Selecting a users conversation based on members
I am trying to formulate a query to select a conversation based on members passed in, this can be many participants. Users can have multiple conversation with the same users in, and they can rename conversations. Here is my messages members table: And the messages relation table: Messages table for reference:…
Is there a way to signal a SIGALRM with a finer-grained delay than pcntl_alarm(int $seconds)?
pcntl_alarm(int $seconds) only has a resolution of seconds. Is there a way in PHP to signal a SIGALRM with a delay of, say, milliseconds? Maybe a posix_kill() with a delay argument? PS.: I’m aware of SwooleProcess::alarm() from the PECL extension Swoole, but I’m looking for a more bare-bones PHP s…
Android app communication with local apache server
I am new to Android dev, I have started using Android Studio with Kotlin few days. I run into an issue today which is : how can my app communicate with my local server (XAMPP : Apache and MYSQL) I am running Windows 10, and using my real physical phone instead of the emulator (API 30) since the emulator works
laravel write multiple where clause to filter files
I don’t know how to filter this in my laravel 9 app using eloquent. I am having a files table and file_metadata (pivot) – where files has multiple metas: ex: file_metadata for 3 files: So files 5 ,6 ,7 have 2 metas (3 active, 6 signed). File 7 is active but not signed. How to write the where claus…
Php language class usage issue
My php multilanguage class returns translated text by field when i call the class. I use echo for return translated text because i fetch whole page in class and translate them in foreach. Problem is when i return translated text with echo, $lang->Translate(“PLANT”) it jumps outside where i put …
Prestashop updateCategories() inconsistent times, works almost instantly sometimes and sometimes it slows to a crawl
Has anyone had any issue with using Prestashop’s Product class updateCategories() before for updating lots of products categories at once? We’re using this to map supplier categories to our own categories and we need to change 100’s-1000’s of products categories. The problem we’r…