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 forgery. 2. Support of MVC Such separation enables Html Layout Designers (less costly staff) to change the appearance of a web page easily without interacting with Developers (more expensive stuff). Possible bug fixes and feature requests would be done by developers faster (read as “cost-effectively”) if all programming code of the…
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″/> <style> * { font-family: DejaVu Sans, sans-serif; } </style>
Adding Toastr Notifications to your Laravel App However you decide to include it in your project you will then need to add the location to the 2 files in the <head> tag of your master layout file like so: <script src=”//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.js”></script> <link rel=”stylesheet” type=”text/css” href=”//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.css”> Then whenever you need to redirect to a page and pass a notification you can pass the redirect a notification array like so: $notification = array( ‘message’ => ‘I am a successful message!’,…
Laravel logger : Source: https://github.com/jeremykenedy/laravel-logger
$teams = DB::table(‘teams’) ->select(“teams.*”,”matches.result” ,DB::raw(‘matches.result, COALESCE(count(matches.result),0) as point’)) ->leftjoin(“matches”,”matches.result”,”=”,”teams.teamName”) ->groupBy(‘matches.result’) ->get();
$mytime = Carbon\Carbon::now(); echo $mytime->toDateTimeString();
$id = Auth::guard(‘customer’)->id();
Step 1: Install the laravel project using the command line. composer create-project –prefer-dist laravel/laravel laravelLiveWire Step 2: Open project in code and use vs code terminal. cd laravelLiveWire Step 3: find .env file in root directory setup database configuration. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=database_name DB_USERNAME=database_username DB_PASSWORD=database_password Step 4: Create Migration and Model php artisan make:migration create_posts_table <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreatePostsTable extends Migration { /** * Run the migrations. * * @return…
Step 1: Install the laravel project using the command line. composer create-project –prefer-dist laravel/laravel laravelCustomRoutes Step 2: Open project in code and use vs code terminal. cd laravelCustomRoutes Step 3: Create Custom Route File Here, I will create following route file with multiple listed route. 1) User Routes: Here you have to define routes in web.php in routes folder. in that file, you have declared routes for user login. 2) Admin Routes: Here you have…
Step 1: Install the laravel project using the command line. composer create-project –prefer-dist laravel/laravel laravel7Ckeditor Step 2: Open project in code and use vs code terminal. cd laravel7Ckeditor Step 3: find .env file in root directory setup database configuration. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=database_name DB_USERNAME=database_username DB_PASSWORD=database_password Step 4: Route Open routes/web.php file. Route::get(‘/’, ‘CkeditorController@index’); Route::post(‘ckeditor/upload’, ‘CkeditorController@upload’)->name(‘ckeditor.upload’); Step 5: Controller Create CkeditorController Controller. php artisan make:controller CkeditorController Open app/Http/Controllers/CkeditorController.php file. <?php namespace App\Http\Controllers; use Illuminate\Http\Request; class CkeditorController…