Relative Content

Tag Archive for laravellaravel-11

room types drop drown diplay as blank Laravel 11

i am a beginner programmer of laravel.when i display the hotel details page on the page room types drop drown diplay as blank.
i tested through dd(); display as null
what the code i tried i attched below. what is issue can some solve out

Laravel dependency injection from middleware to form request

I have a multi language site and I’d like to inject the language list from the language middleware to the form request. As far as I can tell there is a service container which could be used for this purpose, but it is based on the class of the value, while here I just want to inject an array of Language models or stdClass if it comes from cache. Is there a way to inject an array from the middleware to a controller or form request?

Change the first segment of the current URL

I have a multilanguage site: en, hu, ro atm. The base URL is example.com/{locale} e.g. example.com/en. The language detection is just checking the locale parameter of the route. I want it to stay this way.

Class “ZipArchive” not Working in laravel 11

List item Class “ZipArchive” not found in laravel 11. im trying to zip a file . it response this error i globally imported the class. and i installed the zip extension. $zip = new ZipArchive; if ($zip->open($outputFile, ZipArchive::CREATE) === TRUE) { $files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($directory, RecursiveDirectoryIterator::SKIP_DOTS) ); foreach ($files as $file) { $relativePath […]