Echo a multidimensional PHP array in Laravel
I want to return my nested array in a foreach loop. In this foreach loop I need to add a foreach, because it is variable how many accordions exist. But I can't get it to load the data from the…
I want to return my nested array in a foreach loop. In this foreach loop I need to add a foreach, because it is variable how many accordions exist. But I can't get it to load the data from the…
In the application there is column type where the type are: Users and Admin. I want to separate the app file of users to admin. I already edited the file of AuthenticatedSessionController if($user_details->type != 0) { return redirect()->intended(RouteServiceProvider::HOME); }else{ return…
I want to add username before each route.. ex: sam/productDashboard james/productDashboard note - Username is getting from session. i tried like this. it doesn't work Route::get( session()->get('name').'/productDashboard',[ProductController::class,'ProductDashboard'])->name('productDashboard');
I am trying to make a profile settings page where people can chane name email and password and only the password gets updated but all the rest remain the same. I cant understand why below i have the code Note…
there is a different structure to show projects Project 1 and 2 are in the same Project 3 is in a different Project 4 and 5 are in the same Project 6 is in a different it goes on like…
I am making a "/bulk" endpoint for my API/REST made in Laravel 8. My problem is that I don't know how to reuse the same FormRequest that I have for the create or update json post to: /cars/bulk { "cars":…
I want to make sure that the receiving data is a valid timestamp. is there a way to make sure starts_at and expired_at fields are timestamps? $rules = [ 'user_id' => 'required|int|exists:users,id', 'starts_at' => 'required|int|min:1', 'expires_at' => 'required|int|gt:starts_at', ];
this is my code I want to convert this query in to a common query if ($limit == 0) { $response = WebhookErrorNotification::where('is_error', true)->orderByDesc('id')->get(); } else { $response = WebhookErrorNotification::where('is_error', true)->orderByDesc('id')->limit($limit)->get(); }
When I try to get a product and command it I get "IlluminateDatabaseQueryException SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null (SQL: insert into commande (name, familyname, quantity, mobile, ville, adresse, id_product, user_id, updated_at, created_at) values (?, ?,…
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'app.infos' doesn't exist. home controller <?php namespace AppHttpControllers; // use IlluminateHttpRequest; use AppHttpControllersController; use AppModelsinfo; class homeController extends Controller { public function index(){ $data=info::all(); return view('home',['data'=>$data]); } } web php Route::get('home',…