Category Archives: Technical questions

How to Retrieve all input data in laravel

Retrieve all input data as an array using the following method $input = $request->all(); 28.Directory structure in laravel 1.Root directory 2.App directory Root directory contains the below directories. app,bootstrap,config,database,public,resources,routes,storage,test,vendor App directory contains the below directories Broadcasting,Console,events,Exceptions,Http,Jobs,Listeners,Mail,Notifications,Policies,Providers,Rules Click here for more interview questions

Retrieving Uploaded Files in laravel

Access the uploaded file using Illuminate\Http\Request instance. $file=$request->file(‘photo’) //File method $file=$request->photo; //dynamic properties here file method returns an instance of the Illuminate\Http\UploadedFile class, which extends the PHP SplFileInfo A File is present on the request using has method if ($request->hasFile(‘photo’)) { // } Click here for more interview questions

What is Session Driver in laravel ?

Session driver define an option where to store session data of each http request. we can set this config/Session.php -bydefault it will be file file – sessions are stored in storage/framework/sessions. cookie – sessions are stored in secure, encrypted cookies. database – sessions are stored in a relational database. memcached / redis – sessions areā€¦ Read More »