I want to create a new user by calling create method like this: User::create([ 'phone_number' => '09121231212', 'country_code' => ...
I want to create a new user by calling create method like this: User::create([ 'phone_number' => '09121231212', 'country_code' => ...
I just have a really quick question as I am trying to grasp C++ class concept. Why don't we use a single member function for set and get the data memb ...
I created a mutator in model class as follows: The corresponding field is : file_data. Catsts and fillables are also set: I have really tried ev ...
Let's say I have a dictionary like so: And I want to convert these arrays, each with different functions, such as making them vectors of Symbol rat ...
I have two model (Cart & AcceptedCart) and I want to run this method when a row insrted in AcceptedCart model : as you see, I change full_accpt ...
The code is incomplete at the moment, but I was wondering if I could use the String partNo the one that the constructor is making inside the mutator. ...
I'm trying to write a simple program that takes in a Kelvin temperature input from the user, and output the Farneheit and Celsius conversions of it. H ...
On Laravel version 9, I'm trying to use Accessor with an if condition inside; to put it simply, I need to use the Accessor for my application's postIm ...
I am trying to create a program that prompts user for item name, price, and quantity. And then outputs the info entered by the user. When I run it usi ...
I need my mutator to call a different function in my constructor and another function anytime after that, so I was thinking of putting a bool as a sec ...
I have the following query in web.php which is called from use App\Models\clocks as Clock; I also have the following in the model Now, in the la ...
I'm new into Laravel and I'm trying to store the user's company id on a column of the products table each time a user creates a new product. The compa ...
This is an example code which is loaded through a mass job assignment: In "someModel" i have following mutator: When I run the code, contents of ...
I am using laravel backpack for my backoffice and i need to upload some images, i copy the code from their website and works fine, but i need the orig ...
I want to have model property containing array of files from specific directory then I output on the page and I see error I cannot understand ...
I have a scenario where I am defining the mutators below and when I edit the cell it does not work where common mutators are used? I guess this is a b ...
I try to input a model the properties of which are float numbers that are stored in database in a definite unit e.g. for volume : liters. I want the u ...
I noticed that setting a Date Mutator field in protected dates array into the Model, the date format used in the Faker are modified as Carbon object a ...
In saving a model, I have an error thats the slug attribute doesn't have a default value. I had created a setSlugAttribute mutators but it gived me th ...
I have two models: Ingredient, Category Each ingredient has a category id, each category has many ingredients. The problem is that I use auto-incre ...