The objective of this tutorial is that, when the user login via the login page if the user’s type is administrator, he/she will be redirected to the Admin dashboard, otherwise should go to the normal home page. Besides this, we need to ensure that if the user logged in without an administrator role, he/she is inaccessible to the Admin Dashboard.

We will continue from the previous tutorial the source code can be downloaded from Github.

We have done the login and register pages, now we are going to wire up the multi-role authentication. Auth command has created 3 tables schema…


When developing a web application, an authentication system is essential. In this tutorial, we will learn how to customize the login and register page in Laravel v8 with Auth command.

First of all, download the Admin Template from here. Extract the zip file, we will be using src/index.html as our Admin dashboard landing page. Although the template used in this tutorial was different, you can still refer to the How to Integrate Admin Panel Template to Laravel v8 post on how to integrate Admin Template.


In this tutorial, we learn how to build a Spring Boot Rest API with Maven and MySQL. Spring Boot helps you accelerate application developments by reducing the configuration and setup time for Spring projects.

Let’s see how fast we can set up a REST API using Spring Boot. We will be using Eclipse and Maven in this tutorial. The maven project contains a project object model (POM.xml) file to manage the project dependencies and project’s build.

Step 1: Create Spring Boot Project

Go to Spring Initializer to generate a Spring Boot project skeleton.

Select the dependencies which are needed in the project.


This tutorial will show you step by step how to export data to CSV, Excel, and PDF using DataTables in Laravel 8.

First of all, we need to include the DataTables JS library in our project.

...
<link href="{{ asset('public/assets/css/material-dashboard.css?v=2.1.2') }}" rel="stylesheet" />
<!-- DataTable --><script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js" type="text/javascript"></script><script src="https://cdn.datatables.net/1.10.22/js/dataTables.bootstrap4.min.js" type="text/javascript"></script><script src="https://cdn.datatables.net/buttons/1.6.5/js/dataTables.buttons.min.js" type="text/javascript"></script><script src="https://cdn.datatables.net/buttons/1.6.5/js/buttons.flash.min.js" type="text/javascript"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js" type="text/javascript"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js" type="text/javascript"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js" type="text/javascript"></script>…

Often we may need to create or download bulk records in our application. In this tutorial, we will learn how to import and export Excel/CSV files into the database in Laravel 8.0 using MaatWebsite 3.1. Grab the base source code from Github.

Installation

Run the command below to download and install the required package.

composer require maatwebsite/excel

Add the ServiceProvider and alias in config/app.php

'providers' => [
/*
* Package Service Providers...
*/
Maatwebsite\Excel\ExcelServiceProvider::class,
]
'aliases' => [
...
'Excel' => Maatwebsite\Excel\Facades\Excel::class,
]

Now, use the following command to publish the package configuration file.

php artisan vendor:publish --provider="Maatwebsite\Excel\ExcelServiceProvider" --tag=config

This will…


Photo by James Harrison on Unsplash

In this tutorial, we learn about how to set up a simple RESTful API with Node.js, Express, and MongoDB.

Step 1: Install Node and NPM

Before we start, we need to have NPM and Node.js installed on our machine. We relying on NPM Node Package Manager to manage all the packages and modules for Node.js.

Run the command below to verify you have NPM and Node installed. Make sure you see the version of node and npm return on command prompt.

node -vnpm -v

Step 2: Create Node.js App

Once we have the npm installed, setting up a Node.js app can be very fast. …


Continuing from the previous tutorial, we are going to create the frontend to allow users to create, update, and view the product details using Laravel 8 Eloquent.

In Laravel 8, frontend pages are stored in the resources/views directory. Let’s create a folder called product inside the resources/views directory. Next, Create four Blade view files as below. Since our previous tutorial was integrated with an admin template. Hence, we will create the product folder inside the admin folder.

Step 1: Index Page

Copy the code snippet below to index.blade.php as a template.

@extends('layouts.master')@section('title')
PRODUCT | SGWEBFREELANCER
@endsection
@section('content')
<div class="row">
<div class="col-md-12">…

We have set up an admin panel with Laravel 8 in the last tutorial. In this tutorial, we’ll be learning how to create a CRUD app with Laravel 8 to create, update, and delete records from a MySQL database.

Instead of writing raw SQL queries to do CRUD, we will be using Laravel 8 Eloquent to program the CRUD and manage the persistent data. Laravel Eloquent is an Object Relational Mapper (ORM) which helps in communication with the database. Each database table will have a corresponding “Model”.

Step 1: Run artisan

Firstly, run the command below to create a Product model and controller using…


In the previous post, we have learned how to set up the Laravel v8 web application. This tutorial will show you the step-by-step to integrate the admin template to the Laravel v8 web application.

First of all, download a Bootstrap Admin Template. Unzip the template file, we will be using the assets and examples folders.

Step 1: Copy the assets folder and paste it into your Laravel web project public folder.

Step 2: Go to resources-> views create two folder layouts and admin.

Step 3: Create a file name dashboard.blade.php inside the admin folder.

Step 4: Copy the html file…


This tutorial guide you step by step to build a Laravel v8 web application.

Install Laravel

First of all, install the composer with the command below.

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

After that, verify that your workstation has installed composer by run the composer command as below.

Next, we can install Laravel using composer. Run the command below.

composer global require "laravel/installer"

Ensure you set the composer path to $PATH.

export PATH=$PATH:/Users/admin/.composer/vendor/bin

Now we can start to create a Laravel project. Run the command below.

laravel new oems

Laravel comes with its own server, to verify we have successfully…

Wynn Teo

I'm a Full-Stack Developer in Singapore with a passion for coding.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store