Author Archives: admin

Laravel Form Validator

Command

Available Rules

https://laravel.com/docs/5.4/validation#available-validation-rules

Example

 

Java Dev Environment

Tomcat

If you’re using netbeans to develop Java, download .zip version which include complete .bat files in folder bin.

https://tomcat.apache.org/download-70.cgi

Add JDBC connection configs in context.xml

Environment Variables

  • JAVA_HOME
    C:\Program Files\Java\jdk1.8.0_201
  • CATALINA_HOME
    D:\tomcat-7
  • Append paths to variable path:
    %JAVA_HOME%\bin
    %CATALINA_HOME%\bin

User Environment variables

  • CLASSPATH
    %JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\javaee-endorsed-api-7.0.jar

Laravel Seeder Example

https://laravel.com/docs/5.8/seeding

Seed Language Table

DatabaseSeeder

 

Command

 

Multi-language Controller

Javascript

 

Laravel Route

Example

Included

Front end usage

 

Load Different .env File Dynamically

Login

Login Controller

/bootstrap/app.php

\vendor\laravel\framework\src\Illuminate\Foundation\Application.php

 

Laravel Cookie

With Response

With view

Reference:

Laravel Request and Path

 

Laravel Auth Process

Purpose

Create different authentication for both user and admins using Laravel’s default auth process.

Config

  • Create a guard “admin” and its “provider”.

Model for the provider

  • This model has to extend Authenticatable
  • Config some params.

Login Controller

Protected Controller

Middleware

 

Reference: