Skip to main content

Posts

Showing posts from May, 2019

Stand Alone integration og file manager laravel

Reference:  https://unisharp.github.io/laravel-filemanager/integration <! doctype html > < html lang = "en" > < head > < meta charset = "UTF-8" > < title > Laravel Filemanager </ title > < link rel = "shortcut icon" type = "image/png" href = " {{ asset ('vendor/laravel-filemanager/img/folder.png') }} " > < link rel = "stylesheet" href = "//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" > < link rel = "stylesheet" href = "//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" > </ head > < body > < div class = "container" > < div class = "row" > < div class = "col-md-6" > < h2 > Standalone Image Button </ h2 > < div class = "input-group" > < span class = "i

some important points for web developers and hosting

check dns https://www.whatsmydns.net/ https://check-host.net/ https://www.site24x7.com/ping-test.html attacks https://www.computerhope.com/unix/uping.htm https://vitux.com/linux-ping-command/ https://www.howtoforge.com/linux-ping-command/ https://www.poftut.com/linux-ping-command-tutorial-examples/ https://phoenixnap.com/kb/linux-ping-command-examples https://sandilands.info/sgordon/ping-flooding-dos-attack-in-a-virtual-network https://www.geeksforgeeks.org/ping-command-in-linux-with-examples/

get all news associated with a category many to may relationship laravel

public function categoryid ( $id ) { // $news = News::whereHas('categories', function ($query) use ($id) { // $query->where('category_id', $id); // })->where('status', '1')->where('is_publish', '1')->get(); $next = News :: with ([ 'categories' => function ( $query ) use ( $id ){ $query -> where ( 'category_id' , $id ); }])-> where ( 'id' , '>' , $id )-> orderBy ( 'id' , 'asc' )-> get (); return json_encode ( $next ); }

get all unique row with having one column which is not primary key distinct

get all unique row with having one column which is not primary key distinct in laravel:       $datas= Modelname::select()->groupBy('field_name')->get(); now, you will get the error something like non aggrigated bla bla.. so for this you need is .. just go to database.php file inside config folder and find 'strict' and make it false 'strict' => false , now you are done ... you will get the required datas correctly

Facebook Comment Plugin Laravel Integration

Simply you can integrate it over all languages, i have tried on laravel framework and it works. Reference:  https://developers.facebook.com/docs/plugins/comments < div class = "fb-comments" data-href = " {{ url () -> current () }} " data-width = "850" data-numposts = "5" ></ div >

Send variable to all blades using composer view

Reference: https://www.qcode.in/use-laravel-view-composer-to-share-data-in-partial-views/ Steps1 :inside  app/Http , create ViewComposers.php inside  ViewComposers.php <?php namespace App\Http\ViewComposers ; use App\ Nav ; class NavComposer { public function compose ( $view ) { // dd("ds"); $x = "hello baby" ; $view -> with ( 'x' , $x ); } } Now step 2: php artisan make:provider ComposerServiceProvider step 3: inside config - app.php inside providers: 'providers' = > [ . . . App \ Providers \ ComposerServiceProvider :: class , ] ComposerServiceProvider: <?php namespace App\Providers ; use Illuminate\Support\ ServiceProvider ; use Illuminate\Support\Facades\ View ; use App\ News ; class ComposerServiceProvider extends ServiceProvider { public function boot () { // this redirect to view composers n

unisharp filemanager manage

inside config lmf.php there is public and base path and folder which can be changed from there : unisharp filemanager ref1:  https://github.com/UniSharp/laravel-filemanager/blob/master/docs/installation.md ref2 :  https://juancadima.com/integrating-a-file-manager-in-laravel/

email configuration in env file laravel

MAIL_DRIVER=smtp MAIL_HOST=smtp.googlemail.com MAIL_PORT=465 MAIL_USERNAME=gmail MAIL_PASSWORD=pw MAIL_ENCRYPTION=ssl for hosting on server this is to be done .... upper one donot work on server MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=gmail MAIL_PASSWORD=pw MAIL_ENCRYPTION=tls