Laravel 11 – Calling a Procedure in a Model
I'm new to laravel and try to make some simple test websites to get better. I try to call a public procedure I've made in a model. The Idea is to put all the SQL Selects out of the code…
I'm new to laravel and try to make some simple test websites to get better. I try to call a public procedure I've made in a model. The Idea is to put all the SQL Selects out of the code…
I have the following situation. I want to build some Models to use on different prior configured databases. In this case I have a model named Category which should work on a few tables on a Magento 2 database. I…
I want to call an action in the controller in the view and I have to send a series of values to the controller, but the action calls the controller but sends null values. please help me enter image description…
I have a model with QR codes that has a field called type. This field can have two values: 1 (Plate) or 2 (Sticker). I could simply create an enumeration of these types as an array in the model and…
If I have route like this. Route::get('/users/{user}/posts/{post}', function (User $user, Post $post) { return $post; }); Then If User id 1 has Post id 1,2,3 and User id 2 has Post id 4,5,6. How to make Post that bind in…
Does this usage make sense? Will it cause any problems later? function model($folder, $file) { global $db; if (is_file(path . 'app/models/' . $folder . '/' . $file . '.php')) { require_once(path . 'app/models/' . $folder . '/' . $file .…
Here is my code is it correct? Or give me best suggestion. I have two type user role like candidate and business and both have multiple different fields and I want to manage all the fields in one userModel.ts file.…
I have a JSON string with some key is dynamic. { "status": { "code": "200", "message": "OK" }, "total": 1, "results": [ { "leader": "00689cam a2200217 a 4500", "fields": [ { "020": { "ind2": "#", "ind1": "#", "subfields": [ {…
I'm currently building an API assigned for an ecommerce project using Laravel framework. While getting help to build data migrations and Models, I got confused on how the product_categories, the intermediate table, can link a product and category as in…
I'm new using Laravel. I have a model Member with 'dateOfBirth' field and an append field called 'category' (it has information with sports category depending from age like (Under 10, Under 15, Junior, Senior, Veteran...) so it cannot be in…