Category : view

In my web.php I’ve got POST route: Route::post(‘/view-all/{model?}’, [SearchController::class,’viewAll’]); I am trying to return a view from this function and it looks like this: public function viewAll(Request $request) { //code … return view(‘search::single’, [‘searchResults’ => $searchResults, ‘query’ => $q, ‘type’ => $type)); } And in JavaScript I get returned view successfully, but the I am ..

Read more

I installed a package from packagist. But when I try to use it from blade file, it gives me the following error, ParseError syntax error, unexpected end of file, expecting "elseif" or "else" or "endif" (View: C:xampphtdocsLMSMontInsresourcesviewscheckout.blade.php) checkout.blade.php file, <x-pay-here-checkout-form :payable="$payment" success-url="{{ route(‘checkout.success’) }}" cancelled-url="{{ route(‘checkout.cancelled’) }}" form-class="bg-white rounded w-full shadow-sm px-6 pt-2" > <!– ..

Read more

Hi there just asking out of curiosity is there some way to automatically generate a laravel 8 view something like (php artisan make:view some_view.blade.php) before laravel i worked with cakephp and that could generate a view just want to know if that is possible with laravel too somehow Sourc..

Read more

i get templates that users upload in project and project store they on public/templates each template has a folder and the folder has two file. first preview.png , second template.blade.php when i show the template preview, it show as well. but when i want to send email witj this template, i get this error View ..

Read more

I sent the below value from view to controller: in View: <input type="checkbox" name="Roles[]" value="{{$user->rolesTeams[$i]->pivot}}"/> In Controller: case ‘team-delete’: $input = $request[‘Roles’]; dd($input); Result: array:1 [▼ 0 => "{"user_id":"15","team_id":"2","user_type":"AppUser","role_id":"2"}" ] now How can I make this like: $user = user_id >> which should be 15 $team = team_id >> which whould be 2 $role = ..

Read more

I have a view component that is in the components folder but is in a sub folder named models I have always accessed it with the following tag <x-models.models></x-models.models> It has always worked fine but now I need to pass data to it. I understand how the App/View/Components work but since the blade is in ..

Read more

Please help me. I have these 3 tables, and I have problems on how to call the category name based on the restaurant id from Controller to view. Thank you in advance. Table items Table categories Table restorant This is my Controller public function index() { if (auth()->user()->hasRole(‘owner’)) { $items = Items::with(‘category’)->get(); $restorant_id = auth()->user()->restorant->id; ..

Read more

Undefined variable: datanews (View: /home1/ctgroirh/public_html/maqsudan.ctgroup.in/maqsudan/resources/views/components/news.blade.php) http://maqsudan.ctgroup.in/open Working fine in local machine but not working in live server. check below code I pass data to view. return view(‘components.news’,["datanews"=>$datanews ]); below is local machine screen shot , which is working fine. enter image description here Sourc..

Read more

I am using Lumen 8 and Sessions are working properly in the controllers, but when I try to use the sessions in the view, they don’t work and return the error: Error: Argument 1 passed to IlluminateSessionMiddlewareStartSession::addCookieToResponse() must be an instance of SymfonyComponentHttpFoundationResponse, null given, called in /opt/php74/mint_rx/vendor/illuminate/session/Middleware/StartSession.php on line 125 The Controller The View ..

Read more

i am trying to display Sub Faculty that related to Specific University Arranged by specialization and by Main Faculty using laravel i have 4 Modals. i am trying using this code >> but i completly faild public function show_university_single($title , $id) { $university=University::find($id); $institute=Subfaculty_Unversity::with(‘Faculty’)->where(‘university_id_fk’,$id)->where(‘degree_specialization_id_fk’,1 )->orderBy(‘faculties_id_fk’, ‘DESC’)->get(); $bachelor=Subfaculty_Unversity::where(‘university_id_fk’,$id)->where(‘degree_specialization_id_fk’,2 )->orderBy(‘faculties_id_fk’, ‘DESC’)->get(); $master=Subfaculty_Unversity::where(‘university_id_fk’,$id)->where(‘degree_specialization_id_fk’,3 )->orderBy(‘faculties_id_fk’, ‘DESC’)->get(); $doctora=Subfaculty_Unversity::where(‘university_id_fk’,$id)->where(‘degree_specialization_id_fk’,4 )->orderBy(‘faculties_id_fk’, ‘DESC’)->get(); ..

Read more

In Laravel, I am trying to pass multiple parameters to a controller through a route, but it is coming up with an error: Missing required parameter for [Route: allRequests.detailsP] [URI: allRequestsDetailsP/{aid}/user/{uid}] [Missing parameter: uid] The view to call the route is: <a href="{{route(‘allRequests.detailsC’, [‘aid’=>$npen->animals_id, ‘uid’=>$npen->user_id] )}}" >D</a> The route is: Route::get(‘/allRequestsDetailsP/{aid}/user/{uid}’, [AllRequestsController::Class, ‘detailsP’])->name(‘allRequests.detailsP’); The controller ..

Read more

I have for displaying image from my directory. I upload file in the public/uploads/images In the database, images are saved in my organigrammes tables in the profile_image field. my Controller Here: public function update(Request $request, Organigramme $organigramme) { // Check if a profile image has been uploaded if ($request->has(‘profile_image’)) { $request->validate([ ‘profile_image’ => ‘required|mimes:png,jpeg,jpg,svg:|max:2048’ ]); ..

Read more

My view "showcase.blade.php" is situated under the partials sub-folder and I am traying to acces it from "home.blade.php" — in my Partials pages controller i added the following lines — class PartialsPagesController extends AppHttpControllersController { public function showcase(){ return view(‘theme::partials.showcase-pages’, compact(‘showcase-pages’)); } } — in my web.php route file I added this line — Route::get(‘showcase-pages’, ..

Read more