Laravel 8 CRUD using ajax Step 1: Install the laravel project using the command line. composer create-project –prefer-dist laravel/laravel laravel8ajax Step 2: Open project…
How to send mail in Laravel 8 Step 1: Create a Laravel 7 project Step 2: Open laravel project set .env configuration MAIL_DRIVER=smtp MAIL_HOST=smtp.googlemail.com…
Step 1: Install Composer in your system Step 2: Download laravel using composer package composer create-project –prefer-dist laravel/laravel laravel8imageupload Step 3: Configure your database…
Laravel 8 CRUD Step 1: Install Laravel 8 first of all, we need to get fresh Laravel 8 version application using bellow command, So…
By default, Eloquent converts created_at and updated_at columns to instances of Carbon. So if you are fetching the data using Eloquent, then you can do it as below. $object->updated_at->diffForHumans();…
<form class=”newsletter” id=”newsletter”> @csrf <input type=”email” placeholder=”Enter your email address” name=”email” required=””> <button type=”submit”>Subscribe</button> </form> <script> $(‘.newsletter’).on(‘submit’, function(e) { e.preventDefault(); $.ajax({ type: “POST”, url:…
Return from controller return Redirect::back()->withErrors($validator)->withInput(); View part <input type=”text” class=”form-control” name=”name” value=”{{ old(‘name’) }}”> @if($errors->has(‘name’)) <p class=”alert alert-danger print-error-msg”><span class=”glyphicon glyphicon-exclamation-sign” aria-hidden=”true”></span> {{ $errors->first(‘name’)…
@foreach ($data as $index => $value) {{$index}} – {{$value[’name’]}} @endforeach Above Example print from 0 if you want print from 1 than add 1.…
How to show selected value from database in dropdown using Laravel? <select name=”state” id=”state” class=”form-control form_cont” required> <option selected=”true” disabled=”disabled”>Select State</option> @foreach($city as $cities)…
Alert::success(‘Success Title’, ‘Success Message’); Alert::info(‘Info Title’, ‘Info Message’); Alert::warning(‘Warning Title’, ‘Warning Message’); Alert::error(‘Error Title’, ‘Error Message’); // Using the helper alert()->success(‘Title’,’Lorem Lorem Lorem’); alert()->info(‘Title’,’Lorem…
I am using this function You may use it like something like bellow $code = $this->generateRandomString(6);// it should be dynamic and unique public function…
Django: Advantages of Using Django 1. Security Users of Django will be impressed with the level of protection from all possible security-related errors like clickjacking,…
Step 1: Install the laravel project using the command line. composer create-project –prefer-dist laravel/laravel laravel7filter Step 2: Open project in code and use vs code…
1. SecurityUsers of Laravel will be impressed with the level of protection from all possible security-related errors like clickjacking, SQL injections, cross-site scripting, and…