To make it as clear as possible, I am putting the modal window in the app.blade after the jquery and bootstrap js. Still I am getting the $(…).modal is not a function. jQuery(…).modal returns the same error. Don’t get it. What is the problem? Tried with$(window).on("load", function () { $("#myModal").modal("show") }) Again that error. .. Read more I have some routes use with middleware here is one example Route::get(‘/TobeSubmit’, ‘[email protected]’)->name(‘TobeSubmit’); when I use this route outside of middleware its working. here is that middleware Route::group([‘middleware’ => [‘auth’,’Admin’]],function (){ }); when I use that route inside middleware Route::group([‘middleware’ => [‘auth’,’superuser’]],function (){ Route::get(‘/TobeSubmit’, ‘[email protected]’)->name(‘TobeSubmit’);}); like this, its not working, that route use for data .. Read more I have a Profile model that has a OneToOne relation with User model. How do I check if the signed in user already has a profile controller? And if no create one. Thanks Sourc.. Read more If I already have an existing Laravel Jetstream (Inertia) project which was installed without the –teams option is there a way to go back and install support for teams given that I have already created multiple controllers, models, migrations and other customizations within the app? Sourc.. Read more How I can associate business with employees and owner (User table but using roles like Admin/Owner/Manager/Employee) and branches? public function getIsAdminAttribute() { return$this->hasRole(‘administrator’); } public function getIsOwnerAttribute() { return $this->hasRole(‘owner’); } public function getIsManagerAttribute() { return$this->hasRole(‘manager’); } public function getIsEmployeeAttribute() { return $this->hasRole(’employee’); } So I can know who is owner of business .. Read more public function matchOrNot() {$belediyeprofils = DB::table(‘belediye_profil’)->join(‘envanter_genel’, ‘envanter_genel.belediye_id’, ‘=’, ‘belediye_profil.id’)->where(‘envanter_genel.status’, 8)->get(); // $envantergenels = DB::table(‘envanter_genel’)->join(‘belediye_profil’, ‘envanter_genel.belediye_id’, ‘=’, ‘belediye_profil.id’)->get();$i=0; foreach ($belediyeprofils as$belediyeprofil) if($i<100) { {$q = $belediyeprofil->name;$w = $belediyeprofil->ilce;$s = $belediyeprofil->id; } if(strpos($q, $w)!== false) { return$s ; //Matched } else { $returnData = //notMatched [ ‘Sayaç’ =>$i, ‘Id’ ..

If I get the exception Query Exception Duplicate Entry, and if my auto-incrementing id is currently at 4 after inserting the valid entry in my table my id should be 5 but instead, it would be 6. So if I get the 4 duplicate entry exceptions my id will get incremented 4 times. So long ..

I have a site that I created using an existing laravel. I would like to create a SPA page for a part of the site using Vue CLI. What are the best practices for such cases? Source: Laravel 5..

I have integrated gantt chart in laravel 5.7, I would like to upload images on adding new event or task. Can anyone help me, how to do that. Thanks Source: Laravel 5..

If I run the installation command, at the end of the process it throws the following error [ComposerRepositoryInvalidRepositoryException] Invalid repository data in C:Usersفونكس تكنولوجيDocumentsgs-design-web/vendor/composer/installed.json, packages could not be loaded: [ SeldJsonLintParsingException] "C:Usersفونكس تكنولوجيDocumentsgs-design-web/vendor/comp oser/installed.json" does not contain valid JSON Parse error on line 4813: ———————^ Expected: ‘STRING’ It appears you have an extra trailing comma ..

I’m trying to work with foreign keys on Laravel. It’s quite simple how to add foreign key on table. But if table can contain more than one foreign key, for example: Table posts: id, post_title post_content post_category (can be more than one) Table category id, category_title, — I want to get posts list with each ..

How to restrict the direct access to files in Laravel (http://localhost/laravel-blog/public/uploads/sample.jpg) The problem is: If it shows the folder it will try to access other files, directly opening the document path. If I put in URL uploads then it will return nothing, but If I put full URL with the path then it is accessible. ..

In my controller, I have return (‘view_name’,compact(‘some_variable’)); I would like to pass a query string to the URL, i.e. instead of abc.com, I’d like to have abc.com?test=1 I know how to do this via redirects, but how can I do it via just a plain return view? I don’t want to use a redirect in ..

i’m using laravel form request validation to validate a request from view to controller. i’m using php artisan make:request SpecializedRequest. but when the validation fail it doesn’t return back and it gave error 422. i’ve looked up at laravel documentation and i don’t really understand it. How do i make sure if the validation fail ..

I am getting 405 – Method not allowed error for some requests when I try to upload images from BlueImp FileUpload plugin. This normally happens when I try to upload more than 6-7 images. These are the requests. Each request represent a separate file upload request This is the request headers, request and response of ..

I have the following code below in which at the end of code i want it to redirect it to another. So, how could i achieve that. public function edit($id) {$data[‘menu’] = ‘request_payments’; $data[‘request_payments’] =$request_payments = RequestPayment::find($id); ////// some code here return view(‘admin.RequestPayment.edit’,$data); // at that point i want it to redirect ..

I’m trying to create a new migration for my new table with 4 indexes but encountered some issue So what I did is, I separated my indexes Question: Is there any difference in performance if I separated the indexes ? Source: Laravel 5..

so I have this store function at my Controller public function store(Request $request) { Penghuni::create([ ‘nama_penghuni’ =>$request->nama_penghuni, ’email’ => $request->email, ‘phone’ =>$request->phone, ‘tower’ => $request->tower, ‘no_unit’ =>$request->no_unit ]); User::create([ ‘name’ => $request->nama_penghuni, ’email’ =>$request->email, ‘password’ => Hash::make($request[‘password’]), ‘role’ => ‘penghuni’, ]); return redirect(route(‘penghuni.index’)); } what I want is make sure both .. Read more I created routes and controllers for login and register, but when I try to go to either GET login or POST login, the pages don’t show up, and no errors are logged in php_error.log (strange). I did make:auth and the routes and controllers get created, but I cannot get anything useful neither from GET /login .. Read more I have three table A,B,C And Structure Is Shown Below Table A ———————- |id | text_message | ———————- |1 | first Message | ———————- |2 | second Message | ———————- Table B ———————————– |id | request_id | approved_status| ———————————— |101 | 1 | 2 | ———————————— |102 | 1 | 1 | ———————————— |103 | .. Read more I have three table A , B and C and it structure is shown below Table A —————————- | id | Text_message_to_show| —————————- | 1 | first demo message | —————————- | 2 | second demo message | —————————- Table B ———————————— | id | request_id | approved_status | ———————————— | 101 | 1 | .. Read more I use a javascript code to upload multiple files to the server. the problem is that when I upload multiple files with 10 MByte size for example and the server storage only has space for 5 Mbyte then some of the files will upload and some not. I want to send the response name of .. Read more How can i return a variable value from one function and pass it to another function in a class and access it ?, im new to php class. here is the code i have tried <?php class BioTool{ public function one(){$lol =[2,3,5]; print_r($lol); } public function two(){$newarr=\$this->one(); //this only return the array but ..