HOW TO CHECK VERSION OF LARAVEL

1. by command line method open command prompt and go to the laravel application directory. type php artisan –version   2. By checking laravel file In your application directory go to vendor>framework>sric>Illuminate>Foundation and open Application.php search “VERSION” and it contains the laravel version

LARAVEL PROBLEM IMAGE NOT UPLOAD PROBLEM (THE SAME PROBLEM WORKED IN LOCALHOST)

Problem Description: I have recently created a site in laravel and I had the no issue. But when I uploaded the script in the live server, there was an issue in uploading images. My form was absolutely fine <form action=”{{route(‘subject.store’)}}” method=”POST” enctype=”multipart/form-data”> {{csrf_field()}} <input type=”file” name=”image”> <button type=”submit”> Submit </button> </form> My controller was absolutely … Read moreLARAVEL PROBLEM IMAGE NOT UPLOAD PROBLEM (THE SAME PROBLEM WORKED IN LOCALHOST)

Problem in composer create-project

To start a new project in laravel we generally do the following code composer create-project –prefer-dist laravel/laravel projectname OR composer create-project –prefer-dist laravel/laravel projectname “version_of_laravel” You may get error as below   Now the solution for this I found is to put the code below in your command prompt. composer global require “laravel/lumen-installer”

HOW TO ADD A NEW COLUMN TO EXISTING DATABASE [LARAVEL]

First of all make a new migration php artisan make:migration add_mobile_to_userinfo 2. put this code in up() function public function up() { Schema::table(‘users’, function($table) { $table->integer(‘mobile’); }); }   3. put this code in down() function public function down() { Schema::table(‘users’, function($table) { $table->dropColumn(‘mobile’); }); }   4. Migrate the databse php artisan migrate   … Read moreHOW TO ADD A NEW COLUMN TO EXISTING DATABASE [LARAVEL]

How to Pass Value from Model to all the views in Laravel ? with video

It is a bit tricky to pass all the values to the view from the model in laravel. First of all, make controllers and model is a must. I believe you have already done this In controller: View::composer(‘*’, function($views){ $views->with(‘settings’, App\Setting::all()); });   In Views: (according to my video) @foreach($settings as $setting) @if($setting->facebook!=null) <a class=”iconfont-wrapper” … Read moreHow to Pass Value from Model to all the views in Laravel ? with video

Cant Delete File in Laravel? [SOLUTION]

[Q] I am using laravel and while deleting a file in laravel It got error while code is live but worked fine in localhost. Error Looked like this controller is as follow public function destroy($id) { $del=Slider::find($id); if (!empty($del->image)) { $image_path = public_path(“images/slider/{$del->image}”); //File::delete($image_path); unlink($image_path); } $chk=$del->delete(); if($chk){ $data=Slider::get(); Session()->flash(‘msg’,’A Slider has been deleted.’); return … Read moreCant Delete File in Laravel? [SOLUTION]

HOW TO SHOW IMAGE IN YAJRA DATATABLE COLUMN [SOLUTION]

I have a table where I need to show title, image and option. I have already made a datatable jquery and called the data.  My table is as below. <table class=”table”>      <thead>                                                 <tr>                                                     <th>#</th>                                                   <th>Title</th>                                                     <th>Image</th>                                                     <th>Option</th>                                                 </tr>                                             </thead>                                             <tbody>                                             </tbody>                                         </table>   And … Read moreHOW TO SHOW IMAGE IN YAJRA DATATABLE COLUMN [SOLUTION]

How to implement Yajra Datatable in Laravel ?

Datatable is an excellent pacakage for those who wants to make a normal table interactive. The step to implement the Datatable is as follow. You can also follow the documentation of the laravel https://github.com/yajra/laravel-datatables 1) First of all go to your command prompt and your root folder and hit this command composer require yajra/laravel-datatables-oracle You … Read moreHow to implement Yajra Datatable in Laravel ?