Fetch distinct value in laravel
$data = DB::table('service_templates')->distinct()->get(['category']); $brands = DB::table('car_comparision')->get()->unique('brand');
$data = DB::table('service_templates')->distinct()->get(['category']); $brands = DB::table('car_comparision')->get()->unique('brand');
Uploading Files in Laravel is very easy. All we need to do is to create a view file where a user can select a file to be uploaded and a…
composer require stichoza/google-translate-php Goto config/app.php 'aliases' => [ 'GoogleTranslate' => stichoza\GoogleTranslate\GoogleTranslate::class, ] Make routes Route::get('lang', 'GTranslator@lang')->name('lang'); Route::get('lang/change', 'GTranslator@langTranslator')->name('langTranslator'); Make a controller suppose name is GTranslator In GTranslator.php <?php namespace App\Http\Controllers;…
Install dompdf package composer require barryvdh/laravel-dompdf Enable GD & zip extension first (php.ini), then use this cmd. Goto config / app.php 'providers' => [ Barryvdh\DomPDF\ServiceProvider::class, ]; 'aliases' => [ 'PDF'…
Goto this website for api https://crunchify.com/list-of-all-social-sharing-urls-for-handy-reference-social-media-sharing-buttons-without-javascript/ Click number of calling tel:1234567890 Click email for sending mail mailto:example@gmail.com Links for social share A. https://api.whatsapp.com/send?text=[post-title] [post-url] <a href="https://api.whatsapp.com/send?text=All Active Members <?php echo…
$count = DB::table('is_profile_completed')->where('userd', $userid)->count(); $sum = DB::table('is_profile_completed')->where('userd', $userid)->sum('salary'); $data = DB::table('posts')->where('post_status_for_frontend', 1)->orderBy('updated_at', 'desc')->paginate(4); {{count($data)}}