skip to Main Content

How to install Laravel 10.x using Sail?

I use the command curl -s https://laravel.build/example-app | bash And then I get Laravel 11. How to install Laravel 10.x using Sail? I tried command composer create-project --prefer-dist laravel/laravel example-app "10.*" but this project don't use Sail.

VIEW QUESTION

api route not found in laravel

I am new to laravel.Firstly Api.php was not initially created in routes.After creating this is my code: <?php use IlluminateHttpRequest; use IlluminateSupportFacadesRoute; use AppHttpControllersApiStudentController; Route::middleware('auth:api')->get('/user', function (Request $request) { return $request->user(); } ); Route:: get('student',[StudentController::class,'index']); Route::fallback(function () { return response()->view('errors.404',…

VIEW QUESTION

laravel how to define() constants

I googled "laravel constants". All articles say, create "config/myfile.php". <?php return [ ... ]; I thought "constant" means define() define('DIR_IMAGE', '/var/www/html/storage/app/public/image') I really want to use define()。 ChatGPT suggests /bootstrap/app.php At the end, I add define('HTTP_CATALOG', env('APP_URL')); define('DIR_STORAGE', base_path() .…

VIEW QUESTION

Laravel – How make dd()¨works correctly?

I'am trying debug with dd() in laravel application, but in preview in network of my http request I'm getting this script instad of preview of data which should be in array of $all_ids %3Cscript%3E%20Sfdump%20%3D%20window.Sfdump%20%7C%7C%20(function%20(doc)%20%7B%20doc.documentElement.classList.add('sf-js-enabled')%3B%20var%20rxEsc%20%3D%20%2F(%5B.*%2B%3F%5E%24%7B%7D()%7C%5C%5B%5C%5D%5C%2F%5C%5C%5D)%2Fg%2C%20idRx%20%3D%20%2F%5Cbsf-dump-%5Cd%2B-ref%5B012%5D%5Cw%2B%5Cb%2F%2C%20keyHint%20%3D%200%20%3C%3D%20navigator.platform.toUpperCase().indexOf('MAC')%20%3F%20'Cmd'%20%3A%20'Ctrl'%2C%20addEventListener%20%3D%20function%20(e%2C%20n%2C%20cb)%20%7B%20e.addEventListener(n%2C%20cb%2C%20false)%3B%20%7D%3B%20if%20(!doc.addEventListener)%20%7B%20addEventListener%20%3D%20function%20(element%2C%20eventName%2C%20callback)%20%7B%20element.attachEvent('on'%20%2B%20eventName%2C%20function%20(e)%20%7B%20e.preventDefault%20%3D%20function%20()%20%7Be.returnValue%20%3D%20false%3B%7D%3B%20e.target%20%3D%20e.srcElement%3B%20callback(e)%3B%20%7D)%3B%20%7D%3B%20%7D%20function%20toggle(a%2C%20recursive)%20%7B%20var%20s%20%3D%20a.nextSibling%20%7C%7C%20%7B%7D%2C%20oldClass%20%3D%20s.className%2C%20arrow%2C%20newClass%3B%20if%20(%2F%5Cbsf-dump-... It worked 30 mins ago, I…

VIEW QUESTION

How can resolve ERR_CONNECTION_REFUSED accessing my Laravel app from another PC?

login:15 GET http://[::1]:5173/@vite/client net::ERR_CONNECTION_REFUSED GET http://[::1]:5173/resources/js/app.js net::ERR_CONNECTION_REFUSED GET http://[::1]:5173/resources/css/app.css net::ERR_CONNECTION_REFUSED I hosted it on a local server using xampp, inside the server it runs and works very well, but I want to access it outside the server on another machine…

VIEW QUESTION

Laravel successfully adding item in one to many relationship model but it is not being added to database

please help, I've been stuck here since then. I want to insert shipmentrequestitem from shipmentrequest model using update method public function update(UpdateShipmentRequestRequest $request, $id) { $shipmentRequest = ShipmentRequest::with( 'shipmentRequestItems', )->where('id',$id)->first(); $shipmentRequest->update($request->all()); $validatedData = $request->validated(); $shipmentRequestItems = $validatedData['shipmentRequestItems']; // $shipmentRequest =…

VIEW QUESTION
Back To Top
Search