Skip to main content

Posts

Showing posts from November, 2018

creating subdomain and upload

step 1: create subdomain step 2: create database step 3: set username and passwore to database step 4: change php version from multiphp manager to 7.1 or 7.2 step 5: open subdomain from file manager and remane public step 6: upload zip project file step 7: unzip and move all file outside of the projct name folder i.e subdomain vitra siddhai sabai files and folder rakhdini step 8: edit env file db name, user name, and password

upload laravel file in server best way

step 1:  upload zip file first in server step 2: create folder outside the public_html let(xyz) step3: unzip file and move all folders and files except public folder to  xyz folder step4: inside .env file manage database name username etc step 5: copy all files and folders from public folder to public_html folder step 6: inside index.php file change following:                      require__DIR__'/__/xyz/bootstrap....                    $app=require__DIR__'/__/xyz/bootstrap/app.php.... eg: require __DIR__.'/../himanibackend/vendor/autoload.php'; $app = require_once __DIR__.'/../himanibackend/bootstrap/app.php'; $app->bind('path.public', function () {     return __DIR__; }); All is done now one change is: while uploading files and folder  in controller.... store or upload function: $image = '' ; if (! empty ( $request -> file ( 'image' ))) { $file = $request -> file ( 'image' ); // $path = bas

Rest api in laravel Api for Mobile Connection

Reference:  https://www.toptal.com/laravel/restful-laravel-api-tutorial Reference 2 part 1: https://medium.com/@adelekandavid2013/laravel-restful-api-development-a-step-by-step-approach-part-1-fdf9341662e6 Reference 2 : part 2 https://medium.com/@adelekandavid2013/laravel-restful-api-development-a-step-by-step-approach-part-2-6733ebf66133 Reference 3:  https://medium.com/techcompose/create-rest-api-in-laravel-with-authentication-using-passport-133a1678a876

update or create in laravel from store function

Reference: https://laravel.com/docs/5.6/eloquent#insert-update-delete Reference code: here: inside store function, updateorcreate([1],[2]); 1: database maa store garyaa data ko change nahuni attribute to assure which to update 2: update garni data along with not changing data. SeatPrice :: updateOrCreate ([ 'busno' => $busno , 'seattype' => $request -> input ( $seattype )],[ 'busno' => $busno , 'seattype' => $request -> input ( $seattype ), 'price' => $request -> input ( $price ), ]);

Mass Soring and Updating inn laravel

Store : in controller public function store ( Request $request ) { $image = '' ; if (! empty ( $request -> file ( 'image' ))) { $file = $request -> file ( 'image' ); $path = base_path (). '/public/article_upload' ; $name = uniqid (). '_' . $file -> getClientOriginalName (); if ( $file -> move ( $path , $name )) { $image = $name ; } } // $input = $request->except('image'); $input = $request -> all (); $input [ 'image' ] = $image ; $status = article :: create ( $input ); if ( $status ){ Session :: flash ( 'success' , 'customer_card added successfully.' ); } else { Session :: flash ( 'error' , 'customer_card cannot be added.' ); }

Installing Admin LTE in Laravel

step 1:  Reference---  https://hdtuto.com/article/laravel-56-adminlte-bootstrap-theme-installation-example Step 2 : after completion first reference view this link:    https://github.com/JeroenNoten/Laravel-AdminLTE step 3:  For more additional information view this link:   https://github.com/jeroennoten/Laravel-AdminLTE#2-updating Now you are done statically : https://adminlte.io/blog/integrate-adminlte-with-laravel Steps: 1:  composer require jeroennoten/laravel-adminlte 2: 'providers' => [ .... JeroenNoten\LaravelAdminLte\ServiceProvider::class, ], 3: php artisan vendor:publish --provider="JeroenNoten\LaravelAdminLte\ServiceProvider" --tag=assets 5: php artisan vendor:publish --provider="JeroenNoten\LaravelAdminLte\ServiceProvider" --tag=config 6: php artisan vendor:publish --provider="JeroenNoten\LaravelAdminLte\ServiceProvider" --tag=views 7: for admin pannel php artisan make:adminl

use datatables in laravel

@ section ( 'css' ) <link type= "text/css" rel= "stylesheet" href= "{{asset('assets/datatables/css/jquery.dataTables.min.css')}}" > @endsection @ section ( 'js' ) < script type = "text/javascript" src = "{{asset('assets/datatables/js/jquery.dataTables.min.js')}}" ></ script > < script type = "text/javascript" > $ ( document ). ready ( function (){ $ ( '#service_table' ). DataTable (); }); </ script > @endsection <table class = "table table-bordered" id= "service_table" > Same ho mathiko @ section ( 'css' ) <link type= "text/css" rel= "stylesheet" href= "{{asset('assets/datatables/css/jquery.dataTables.min.css')}}" > @endsection @ section ( 'js' ) < script type = "text/javascript" src = "{{asset(