#### Category : forms

Disclaimer: even if it says delete, It is more of an archive type of update as the delete button here updates column rows (archived rows is hidden in select statement) Goal: when delete button is clicked, the table updates the two archive columns based on group_id. In this example, it is group_id = 51 Below ..

I am facing an issue while taking columns from the main table and pivot table. So I have two tables name: users and roles and a pivot table called role_user. here is the migration of users table: Schema::create(‘users’, function (Blueprint $table) {$table->engine = ‘InnoDB’; $table->id();$table->string(‘name’); $table->string(’email’)->unique();$table->timestamp(’email_verified_at’)->nullable(); $table->string(‘password’);$table->rememberToken(); $table->timestamps(); }); Here is .. Read more To explain my title, this is my table, it has multiple rows with the same group_id but different id Here are those same rows in my output: (I added their id beside the names to show the value) My problem is that when I click on for instance, the edit button on the first row .. Read more I have a form in my laravel script, I want to know how to use cron job to delay the form once it is submitted. I want it to make it submit to the database after Five minutes. Here is the HTML code to the form, I want it to post to the cron jobs .. Read more I have a view that show us following result : link as you can see every item has a delete button that need a item id and a form with delete method, on the other hand every item has a checkbox too, and I need form for all of them with a different method, look .. Read more I have a words table and I want to keep a search form in my index view to search intended word. This is function that I have wrote for search in controller. public function search(string$id){ if($id!="") {$terms = Terms::query() ->where(‘term’, $id) ->get(); if(count($terms)==0) { $terms = Terms::query() ->where(‘term’, ‘LIKE’, "{$id}%") ->orWhere(‘term’, ‘LIKE’, "%{$id}%") .. Read more I have a words table and I want to keep a search form in my index view to search intended word. This is function that I have wrote for search in controller. public function search(string$id){ if($id!="") {$terms = Terms::query() ->where(‘term’, $id) ->get(); if(count($terms)==0) { $terms = Terms::query() ->where(‘term’, ‘LIKE’, "{$id}%") ->orWhere(‘term’, ‘LIKE’, "%{$id}%") .. Read more I am new to Laravel and I want to show these elements of form in one line ? how can I do it ? {{ Form::text(‘action_title’, ”, [‘class’ => ‘form-control’, ‘placeholder’ => ‘inser search word’]) }} {{ Form::submit(‘search’, [‘class’ => ‘btn btn-primary’]) }} Sourc.. Read more I work on a Saas project where users can submit/upload items. I want to create a similar work-flow like Youtube. This means that the user uploads image file, ZIP files etc. which then show in the upload progress block, during this time I want the user to be able to edit the other informations like .. Read more I am facing problem, while performing permissions to custom middleware in laravel? so the thing is , I have assgined permissions to particular items to the particular roles in laravel. here is the ui : here is the link of photo , now the main thing is, here post , comment , user are items .. Read more I am facing a problem while performing permissions to custom middleware in Laravel? so the thing is, I have assigned permissions to particular items to the particular roles in Laravel. here is the UI: , now the main thing is, here post, comment, user are items and add, view, edit, delete are permissions, which are .. Read more I want to show 1st form received data to 2nd form. How can i apply this process using laravel 5.8. Also here i can use laravel collection packages. /* ========= Routes ===========*/ Route::post(‘/subscribe/new’, ‘[email protected]’); /1st form Route::post(‘/subscribe/add’, ‘[email protected]’); /2nd form /* ========== 1st Form ============ */ {!! Form::open([‘url’ => ‘subscribe/new’, ‘method’ => ‘POST’]) !!} <input .. Read more In my project I have to link two different models (A and B) in a many-to-many relationship, with a pivot table that has additional fields (additionaldata1 and additionaldata2) together with the model’s ids. My approach has been to create a table where each row is a different B entry, and the user gets to add .. Read more Here I am facing an error, I have one form where , I have to update the selected checked box value and uncheck the values which I don’t want , means checking new values and unchecking some of the values not all values , here is the ui of form: as shown in picture suppose .. Read more I am facing an error , I want to fetch the array of selected checked box , which are saved in the database like this – , and the view of this is like : now the thing is that , I have used role_id as a id to access it , means when user .. Read more I’m trying to use the PLUCK method to display two columns of a table when selecting them$driverItems = Driver::pluck(‘driverName’,’id’)->toArray(); I need to display the driver name and the Licence Sourc..

I want to store all the selected check box values in single column separately like here is my code for that <tr> <th scope="row"> <input class="form-control" type="text" placeholder="Posts" readonly> </th> <td class="examplelink"> <input type="checkbox" name="checkPermission[]" value="Add"> </td> <td class="examplelink"> <input type="checkbox" name="checkPermission[]" value="View"> </td> <td class="examplelink"> <input type="checkbox" name="checkPermission[]" value="Edit"> </td> <td class="examplelink"> <input type="checkbox" ..

I am facing an error. so the thing is that .. I have column name role_permission, where I have to store the roles to each role , here is the ui of form – as you can see here , I have select option where user can select roles like -admin, users ,editor, and three ..

I am facing an error. so the thing is that .. I have column name role_permission, where I have to store the roles to each role , here is the ui of form – as you can see here , I have select option where user can select roles like -admin, users ,editor, and three ..

I have a problem, how do you add / remove a rule if another rule passed/fails? public function rules() { $rules = [ ‘description’ => ‘required|unique:orders,description’, ‘user_id’ => ‘required|unique:users,id’, ‘supplier_id’ => ‘required’, ‘warehouse_id’ => ‘required|unique:warehouse,id’, ‘warehouse_qty’ => ‘required’ ]; return$rules; } For example, if the "warehouse_id" rule fails, it would not be necessary to ..

I have a problem, how do you add / remove a rule if another rule passed/fails? public function rules() { $rules = [ ‘description’ => ‘required|unique:orders,description’, ‘user_id’ => ‘required|unique:users,id’, ‘supplier_id’ => ‘required’, ‘warehouse_id’ => ‘required|unique:warehouse,id’, ‘warehouse_qty’ => ‘required’ ]; return$rules; } For example, if the "warehouse_id" rule fails, it would not be necessary to ..

For example data in Database as <div> @include(‘web.home’) <div> and in Laravel view can we parse this data and partial view as assumed $test is holding the data {{$test}} or {!! $test !!} not worked I have tried to recompile the blade using Blade::compileString($test) again no luck Sourc..

I’m developing a site in laravel. I have a view for editing and creating posts that brings the data stored from the database. For example: <input class="form-control" id="title" name ="title" type="text" value="@if($article != null){{$article->title}}@endif"> The problem is that when the user makes modifications, try to save the data and has validation errors, he loses all ..
i stack with livewire Update with checkbox array please help. Form <form wire:submit.prevent="Update" class="py-3 mb-6"> @foreach ($permissions as$key => $pms) <input type="checkbox" model:wire="PermissionCheckbox.{{$key }}" {{ in_array($pms->id ,$PermissionCheckbox)? "checked":"" }} /> @endforeach <button class="btn btn-primary" type="submit">Update</button> </form> Php Function public function Edit($id){$role = Role::find($id);$this->roleId = $role->id;$this->roleName = $role->name;$this->PermissionCheckbox = ..