Currently, I am in the process of developing a module for my laravel web application that allows users to create multiple projects. These projects can have multiple contributors who need to be approved by the owners. The functionality for owner users has b ...
Displayed below is the code snippet from my app's Cart.php use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; class Cart extends Model { use SoftDeletes; protected $table = &apo ...
In Laravel, it is possible to establish validation rules for input fields like the following: $return = [ 'first_name' => 'required|max:300|min:3', 'last_name' => 'required|max:300|min:3', 'email' => 'required|email, ...
Here is the controller code snippet I'm using: $test= test::find($id); return $test; Initially, it was returning null. However, when I modified it to: $test= test::where('id',$id)->get(); return $test; it started returning all v ...
I'm encountering an issue while trying to use the JSON Resource to Array converter in Laravel. Here is a snippet of my code: DataResource.php <?php namespace AppHttpResources; use IlluminateHttpRequest; use IlluminateHttpResourcesJsonJsonReso ...
I am working with this data containing various attributes: for(var k = 0;k<this.form.fields.length;k++) { this.dynamic_fields.push({attribute_id:attributes[k].id,value: attributes[k].value}) ...
Having issues installing laravel on a shared hosting at KVC webhost. Getting a blank page. Checked the log and it seems like proc_open() and passthru() aren't enabled on my server, which is causing errors. Reached out to my webhosting for help but they c ...
How can I retrieve all parents from a table and calculate the number of children they have? Check out my code: DB::table('wiki_page') ->where('wiki_page.parent_id', '=', null) ->get(); Table Structure id | name | parent_id -------- ...