Skip to main content

Posts

Laravel Validation email Tutorial

Hi Dev, Today, I will learn you to create validation email in laravel.we will show example of laravel validation email.The field under validation must be formatted as an e-mail address Here, I will give you full example for simply email validation in laravel bellow. solution $request->validate([ 'email' => 'required|email', ]); Route : routes/web.php Route::get('form/create','FromController@index'); Route::post('form/store','FromController@store')->name('form.store'); Controller : app/Http/Controllers/BlogController.php <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\Blade; use App\Models\User; use App\Models\Post; class FromController extends Controller { /** * Write code on Method * * @return response() */ public function create() { return view('form'); } /** * Write code on Method * *...

Laravel 8 ConsoleTvs Charts Tutorial

Hi Guys, Today,I will learn you how to use consoletvs charts in laravel 8. If you need to add some graphs to your views, maybe you have work with some js library to add cool graphics but even with a good library like ChartJS implementing this is not so easy. Step 1: Install Laravel 8 Application we are going from scratch, So we require to get fresh Laravel application using bellow command, So open your terminal OR command prompt and run bellow command: composer create-project --prefer-dist laravel/laravel blog Step 2 :Installing consoletvs Package Now In this step, install consoletvs/charts:6 package in laravel 8 app via following command. composer require consoletvs/charts:6 If you are working with Laravel 5.5 or higher thats all you need to install the package thanks by autodiscover feature. If you work with Laravel lower than 5.5 you will need to register a service provider, add this line into the config/app.php file in the providers section: ConsoleTVs\Charts\ChartsServiceProvi...

Laravel 8 Resize Image Before Upload Example Tutorial

Hi Guys, Today, I will learn you how to resize image before upload in laravel 8. we will show example of resize image before upload in laravel 8.if you want to see example of laravel 8 generate thumbnail image then you are a right place. we will help you to give example of laravel 8 resize image before upload.I will explain step by step tutorial laravel 8 resize image. We will give you simple example of laravel 8 image intervention example. you will do the following things for resize and upload image in laravel 8. we will use intervention/image package for resize or resize image in laravel. intervention provide a resize function that will take a three parameters. three parameters are width, height and callback function. callback function is a optional. Here, I will give you full example for simply resize image before upload using laravel as bellow. Step 1: Install Laravel 8 Here In this step, If you haven't laravel 8 application setup then we have to get fresh laravel 8 applic...

Laravel Custom ENV Variables Tutorial

Hi Dev, Today,I will learn you how to add custom env variables in laravel. We will example of laravel custom env variables. i explained simply about how to add custom env variables in laravel. i would like to share with you add new custom env variables laravel. Let's get started with laravel create new env variable. we may require to add new env variable and use it. i will give you two examples of how to adding new env variable and how to use it with laravel application. Here, I will give you full example for simply custom env variables using laravel as bellow. Example 1: using env() helper In this example,first add your new variable on env file as like bellow. .env ... GOOGLE_API_TOKEN=xxxxxxxx Use it. Route::get('helper', function(){ $googleAPIToken = env('GOOGLE_API_TOKEN'); dd($googleAPIToken); }); Output: xxxxxxxx Example 2: using config() helper In this example,now first add your new variable on env file as like bellow. .env ... GOOGLE_A...

Jquery UI Nested Tabs Tutorial

Hi guys This post will give you example of jquery ui nested tabs example . Here you will learn jquery ui sub tabs example. This tutorial will give you simple example of example of jquery ui tabs with subtabs. This tutorial will give you simple example of jquery ui tabs with subtabs. In this blog, I will explain how to create nested tabs in jquery ui.we will show example of jquery ui nested tabs.I will jquery ui using create nested tabs.tabs view In other tab view create using jquery ui.We will make sub tabs using jquery and jqueryUi.I will show easy example of jquery ui sub tabs. Here the example of jquery ui nested tabs. Example Now this nested tabs html design code: <!DOCTYPE html> <html> <head> <title>Jquery UI Nested Tabs Example</title> <link rel="stylesheet" href="https://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"> <script data-require="jquery@2.1.1" data-semver="2.1.1...

Laravel 8 Autocomplete Search using Typeahead JS Example

Hi Guys, Today,I will learn you how to create autocomplete search using typeahead js in laravel 8. We will show example of laravel 8 autocomplete search using typeahead js. We will share with you how to build search autocomplete box using jQuery typehead js with ajax in laravel 8.i will use jQuery typehead js plugin, bootstrap library and ajax to search autocomplete in laravel 8 app. Here, I will give you full example for Laravel 8 ajax autocomplete search using typeahead js as bellow. Step 1: Install Laravel 8 Application we are going from scratch, So we require to get fresh Laravel application using bellow command, So open your terminal OR command prompt and run bellow command: composer create-project --prefer-dist laravel/laravel Laravel8TypeheadTutorial Step 2: Database Configuration In this step, configure database with your downloded/installed laravel 8 app. So, you need to find .env file and setup database details as following: DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3...

Laravel Validation Number Less Than Example

Hi Guys, Today, I will learn you to create validation lt in laravel.we will show example of laravel validation lt.The given field The field under validation must be less than the given field. The two fields must be of the same type. Strings, numerics, arrays, and files are evaluated using the same conventions as the size rule. Here, I will give you full example for simply lt validation in laravel bellow. solution $request->validate([ 'detail' => 'lt:20', ]); Route : routes/web.php Route::get('form/create','FromController@index'); Route::post('form/store','FromController@store')->name('form.store'); Controller : app/Http/Controllers/BlogController.php <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\Blade; use App\Models\User; use App\Models\Post; class FromController extends Controller { /** * Write code on Method * * @return response() *...

Vue Js Toggle Switch Button Example

Hi Dev, In this example, I will explain you how to use toggle switch button in vue js. wr will show example of toggle switch button in vue js.we will use vue-js-toggle-button npm package for bootstrap toggle button example. vue cli toggle button is a simple, pretty and customizable. vue-js-toggle-button provide way to change label and make it default checked. you can also customize several option like value, sync, speed, color, disabled, cssColor, labels, switchColor, width, height, name and with change event. below i will give you simple example from starch so, you can see full example use it in your app. Step 1: Create Vue JS App Now this step, we need to create vue cli app using bellow command: vue create myAppSwitch Step 2: Install vue-js-toggle-button package below we need to install vue-js-toggle-button npm package for toggle switch. npm install vue-js-toggle-button --save Step 3: Use vue-js-toggle-button In this step, We need to use vue-js-toggle-button package in main.js ...

Laravel Validation Image Example

Hi Guys, Today, I will learn you to create validation image in laravel.we will show example of laravel validation image.The file under validation must be an image (jpg, jpeg, png, bmp, gif, svg, or webp). Here, I will give you full example for simply image validation in laravel bellow. solution $request->validate([ 'file' => 'image' ]); Route : routes/web.php Route::get('form/create','FromController@index'); Route::post('form/store','FromController@store')->name('form.store'); Controller : app/Http/Controllers/BlogController.php <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\Blade; use App\Models\User; use App\Models\Post; class FromController extends Controller { /** * Write code on Method * * @return response() */ public function create() { return view('form'); } /** * Write code on Method ...

Laravel Convert PDF to Image Example

Hi Guys, Today,I will learn you how to convert pdf to image in laravel. we will Pdf To Image Convert using imagick package. you can easyliy convert pdf to image any formate in laravel. if you want to convert pdf to image than you can use here example. we will show setp by step example laravel pdf to image convert. Here, I will give you full example for pdf to image convert in laravel as below. Step 1: Install Laravel we are going from scratch, So we require to get fresh Laravel application using bellow command, So open your terminal OR command prompt and run bellow command: composer create-project --prefer-dist laravel/laravel blog Step 2: Installing Imagick PHP Extension And Configuration Here In this step, I will install the Imagick PHP extension is available from the Ubuntu’s repositories. Like ImageMagick, to do an imagick php install we can simply run the apt install command. sudo apt install php-imagick If you require a previous version of php-imagick, you can list the vers...

Laravel Validation Accepted Example

Hi Guys, Today, I will learn you to create validation accepted in laravel.we will show example of laravel validation accepted.The field under validation must be "yes", "on", 1, or true. This is useful for validating "Terms of Service" acceptance or similar fields. Here, I will give you full example for simply accepted validation in laravel bellow. solution $request->validate([ 'terms' => 'accepted', ]); Route : routes/web.php Route::get('form/create','FromController@index'); Route::post('form/store','FromController@store')->name('form.store'); Controller : app/Http/Controllers/BlogController.php <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\Blade; use App\Models\User; use App\Models\Post; class FromController extends Controller { /** * Write code on Method * * @return response() */ public function crea...

Laravel Validation Required Example

Hi Guys, Today, I will learn you to create validation required in laravel.we will show example of laravel validation required. The field under validation must be present in the input data and not empty. A field is considered "empty" if one of the following conditions are true The value is null. The value is an empty string. The value is an empty array or empty Countable object. The value is an uploaded file with no path. Here, I will give you full example for simply required validation in laravel bellow. solution $request->validate([ 'rank' => 'required', ]); Route : routes/web.php Route::get('form/create','FromController@index'); Route::post('form/store','FromController@store')->name('form.store'); Controller : app/Http/Controllers/BlogController.php <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\Blade; use App\Models\User; use App\Models\Post...

Codeigniter For Validation With Error Message Example

Hi Guys In this tutorial,i will show you how to implement server side validation example,it can easyli Codeigniter Server Side Form Validation With Error Message in this example,normal validation two sides like server side and client side, i will give you simple example of form validation in codeigniter application. we will use form_validation library for add form validation with error message display in codeigniter. we can use defaulut following validation rules of codeigniter.We can use default following validation rules of codeigniter required regex_match matches differs is_unique min_length max_length exact_length greater_than You can see more from here Codeigniter Validation Rules. Exmaple So here i gave you full example of form validation in codeigniter application. i created simple form with first name, last name, email and Mobile Number like contact us form and i set server side validation. Step:1 Download Codeigniter Project Here in this step we wi...

PHP Ajax Image Upload With Preview Example

Hi Guys, In this tutorial, i will give you simple example of ajax image upload with preview in php. Uploading image via an jquery AJAX in php. I have added code for doing PHP image upload with AJAX without reloading the page. xI use jQuery AJAX to implement image upload. There is a form with file input field and a submit button. On submitting the form with the selected image file, the AJAX script will be executed. In this code, it sends the upload request to PHP with the uploaded image. PHP code moves the uploaded image to the target folder and returns the image HTML to show the preview as an AJAX response. The following code shows the HTML for the image upload form. On submitting this form the AJAX function will be called to send the request to the PHP image upload code. Create Form form.php <html> <head> <title>PHP AJAX Image Upload</title> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <link rel="styl...

Laravel Livewire Fullcalendar Integration Example

Hi Guys, Today, I will learn you how to use fullcalendar with livewire example. We will explain step-by-step laravel livewire fullcalendar integration. you can easily make livewire fullcalendar integration in laravel. we will describe laravel livewire fullcalendar integration. Here, I will give you full example for simply livewire fullcalendar integration in laravel native as bellow. Step 1 : Install Laravel App In First step, We need to get fresh laravel version application using bellow command. So Let's open terminal and run bellow command. composer create-project --prefer-dist laravel/laravel blog Step 2 : Setup Database Configuration After successfully install laravel app thenafter configure databse setup. We will open ".env" file and change the database name, username and password in the env file. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=Enter_Your_Database_Name DB_USERNAME=Enter_Your_Database_Username DB_PASSWORD=Enter_Your_Database_Passwor...