Category

Laravel

Category

Hey, Real Programmer, I will brief you step by step livewire form in Laravel 7. I will guide you step by step. let’s follow the tutorial and implement it. Livewire is a laravel framework that makes building dynamic interfaces simple, without leaving the comfort of Laravel. if you are using livewire with laravel then you don’t worry about writing jquery ajax code, livewire will help to write very simple way jquery ajax code using PHP.…

https://www.youtube.com/watch?v=Kwt1guvyJgM Step 1: Install Laravel 7 first of all, we need to get fresh Laravel 7 version application using bellow command, So open your terminal OR command prompt and run bellow command: composer create-project –prefer-dist laravel/laravel todoApp Open your project in vs codeConfigure your database (.env file) DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=quickstart DB_USERNAME=root DB_PASSWORD=root@123 php artisan make:migration create_tasks_table –create=tasks Open migration file Put this line inside of migration table public function up() { Schema::create(‘tasks’, function (Blueprint…

Renaming the server.php to index.php Copy the .htaccess from public folder to root folder Changing .htaccess it a bit as follows for statics: <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews -Indexes </IfModule> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^/public/ RewriteRule ^(css|js|images)/(.*)$ public/$1/$2 [L,NC] </IfModule>

Example 1: public function admin() { $admin = Admin::select(‘name’,’id’) ->where(‘id’, $adminID) ->where(‘name’, $name) ->get(); dd($admin); } Example 2: public function admin() { $admin = Admin::select(‘*’) ->where([ [’id’, $adminID], [’name’, $name] ]) ->get(); dd($admin); }

Step 1: Install Laravel 7 Project I am going to install a laravel project using composer. composer create-project –prefer-dist laravel/laravel laravel7 Step 2: Going inside of project using the command cd laravel7 Step 3: Setup MySQL database Now, configure this database in the .env file. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel7 DB_USERNAME=root DB_PASSWORD=root@123 Step 4: Route Setup Here I am going to create routes to get and post method. now open “routes/web.php” file and put below code.…

Step 1: Install Laravel 7 Project I am going to install a laravel project using composer. composer create-project –prefer-dist laravel/laravel laravel7 Step 2: Going inside of project using the command cd laravel7 Step 3: Setup MySQL database Now, configure this database in the .env file. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel7 DB_USERNAME=root DB_PASSWORD=root@123 Step 4: Create employee_images Table and Model also. Here, I have created migration for employee_images using Laravel 7 php artisan command, you can check…

Today, I am going to show you how to create a custom 404 page in laravel 7.First, you need to create a page inside of resources/views/errors/404.blade.phpNow, Code inside of 404.blade.php <!DOCTYPE html> <html lang=”en”> <head> <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css”> <script src=”https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js” ></script> <style type=”text/css”> *{ transition: all 0.6s; } html { height: 100%; } body{ font-family: ‘Lato’, sans-serif; color: #888; margin: 0; } #main{ display: table; width: 100%; height: 100vh; text-align: center; } .fof{ display: table-cell;…