Category Archives: Laravel

Without index.php laravel url not working In Ubuntu/How to remove index.php in laravel ubuntu

How to remove index.php in the url of laravel in ubuntu Solutiion:After a fresh installation of laravel 5.6 with php7 in ubuntu 16 version.if we execute the below url http://localhost/myproject/public — this will show the welcome page http://localhost/myproject/public/adminlogin — this will not work .But if you add index.php in the url like below http://localhost/myproject/public/index.php/adminlogin– this… Read More »

Excel file creation failure in laravel

PHPExcel_Calculation_Exception in Cell.php line 293,Formula Error:am unexpected error occured Error Scenario: This error usually throws because of special characters.if that characters are reserved words in the excel formula calculation. i got this error in one of my application.excel files created using large set of data. In this one of the field start with symbol (=)… Read More »

setting all permision for the laravel folders in ubuntu

I installed laravel inside var/www folder in ubuntu.but it is not working due to permission issue.So we can use the below provided command to solve the issue. vasanthan@vasanthan:/var/www$ sudo chown -R vasanthan:vasanthan /var/www/multiloginlaravel/

Usage of Stored procedures/function in laravel

Stored procedure/function as like below

Above stored fuction will execute and it will be saved in the database.We can see this in the phpmyadmin how to use the above function in the laravel eloquent model as like below,

Interview questions and answers in laravel

Top 100 Interview questions and answers in laravel Usage of config helper function in laravel its a global function we can access the configuration file value using dot operator.It includes the name of the file and the option we need to access. Example: To get the value :: config(‘app.timezone’); To set the configuration value:: config([‘app.timezone’=>’America/Chicago’]);… Read More »

File upload in Laravel

File Upload using laravel 5.2 Here i m giving you a sample code for file upload in laravel.This code contains only file upload there is no validation added here.Files are storing into the public/uploads folder.uploaded file details are stored in the database. Step1:database Setup and table creation added the database details in the .env file… Read More »

$request->input() not working in laravel

getting the below error while using the $request->input(‘f_name’); ErrorException in Controller.php : Non-static method Symfony\Component\HttpFoundation\Request::get() should not be called statically, assuming $this from incompatible context this is because of use Illuminate\Support\Facades\Request; if we use use Illuminate\Http\Request;, then $request->input will work

Delete in Laravel with join condition

Below query using DB::table is for deleting records from a table using join with other table