https://www.php.net/manual/en/function.str-pad.php
Useful when for example add 0000 prefix to and ID (int) STR_PAD_LEFT / RIGHT
https://www.w3resource.com/mysql/string-functions/mysql-lpad-function.php
https://stackoverflow.com/questions/3446538/cleanest-way-to-skip-a-foreach-if-array-is-empty
https://laravel.io/forum/07-28-2014-error-using-this-when-not-in-object-context
$table is an instance variable, not a static variable, so you can't use it in a static function (basic PHP).
Damn basic PHP that I miss, and many interview question asked this shit.
Yeah, update Model func remove static and update Controller call:
// Model
public function findMyReviewedShop() {}
// Controller
$data = (new AreaModel)->findMyReviewedShop($user_id, $area_id);
// instead of ::
https://stackoverflow.com/questions/34947862/how-to-use-hasmanythrough-with-more-than-3-tables-in-laravel
Questions:
1. Is relation query return all related data ? ie. review->shopdata ...
This is huge data and is a bad practice ?
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: app/Models/AreaModel.php
Yeah about Graphic card, my wonder is true, there are some Chinese brand beside Taiwan.
https://forums.tomshardware.com/threads/are-zotac-and-galax-reliable-nvidia-graphics-card-manufacturers.2861007/
Useful when for example add 0000 prefix to and ID (int) STR_PAD_LEFT / RIGHT
https://www.w3resource.com/mysql/string-functions/mysql-lpad-function.php
https://stackoverflow.com/questions/3446538/cleanest-way-to-skip-a-foreach-if-array-is-empty
https://laravel.io/forum/07-28-2014-error-using-this-when-not-in-object-context
$table is an instance variable, not a static variable, so you can't use it in a static function (basic PHP).
Damn basic PHP that I miss, and many interview question asked this shit.
Yeah, update Model func remove static and update Controller call:
// Model
public function findMyReviewedShop() {}
// Controller
$data = (new AreaModel)->findMyReviewedShop($user_id, $area_id);
// instead of ::
https://stackoverflow.com/questions/34947862/how-to-use-hasmanythrough-with-more-than-3-tables-in-laravel
Questions:
1. Is relation query return all related data ? ie. review->shopdata ...
This is huge data and is a bad practice ?
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: app/Models/AreaModel.php
Yeah about Graphic card, my wonder is true, there are some Chinese brand beside Taiwan.
https://forums.tomshardware.com/threads/are-zotac-and-galax-reliable-nvidia-graphics-card-manufacturers.2861007/
Comments
Post a Comment