Sorry about the lull in publishing; I’m back to publishing at least one article per week. This is the fourth article in our series on Laratrust. In this article, we will modify the registration process to allow users to register either as readers or writers. We will also learn how to set up our admin account using a seeder.

Views

Let’s make some changes to the welcome.blade.php and auth/register.blade.php files as shown below.

welcome.blade.php:

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title><!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap" rel="stylesheet">
<!-- Styles -->…

Every schooling child in my country grows up hearing stories about jobless university graduates — on the radio, social media, even church. The country’s unemployment situation also makes for a great conversation piece — even when the conversation involves strangers. Each participant is likely to know a few stories about unemployed graduates to share. Throw politics into such a conversation and our strangers are likely to come away from the conversation with promises to stay in touch.

When you grow up in such a country, you may start out with lofty ambitions of becoming a pilot, going to space or…


This is the third article in our series on Laratrust. In this article we will be seeding our database with the roles and permissions defined in the previous article. We will also setup the migrations and Models we need. Let’s begin.

Seeding database with roles and permissions

  1. Open your command line in your project folder and run the following commands in the order the appear:
php artisan make:model Article -mphp artisan laratrust:seederphp artisan vendor:publish --tag="laratrust-seeder"composer dump-autoload

The first line allows us to create a model called “Article” and a corresponding migration to handle blog article data. The other lines create your Laratrust seeder.


This article is the second in my series on Laratrust. The structure of the blog we are going to build will be explained in this article. It will also cover all the background information about roles and permissions we will need. Let’s do this !!!

Case Scenario

We wish to create a simple blog. To do this, we decide we need a rich text editor for bloggers to use in writing articles. We also need to store data about articles, writers and readers who sign up onto the blog.

This means we will be having different types of users sign up onto…


This article is the first in a series covering the management of roles and permissions in Laravel using the Laratrust package. As part of this series we will build a simple blog using the CKEditor, we will learn how to apply Laratrust in managing users on the website and how to use Laratrust’s team feature. This article, however will cover setting up your database, Laratrust and the CKEditor. Follow the steps below and you will be ready to go:

1. Create a new Laravel project

We will name our Laravel project blog. To create it, we open our command line, navigate to the folder we wish…


With social authentication, users do not have to fill out forms in order to register on your website; they also do not need to remember another password in other to access their accounts on your website. This article will provide a step-by-step process to add Google authentication to your website

Assumptions:

This tutorial assumes that you have PHP and Composer installed on your computer. It also uses XAMPP’s Apache and MySQL installations. It is therefore assumed that the reader is familiar with XAMPP. Visit the Composer and XAMPP websites to download them.

1. Create a new Laravel project

Run the following on your command line to…


With social authentication, users do not have to fill out forms in order to register on your website; they also do not need to remember another password in other to access their accounts on your website. This article will provide a step-by-step process to add LinkedIn authentication to your website

Assumptions:

This tutorial assumes that you have PHP and Composer installed on your computer. It also uses XAMPP’s Apache and MySQL installations. It is therefore assumed that the reader is familiar with XAMPP. Visit the Composer and XAMPP websites to download them.

1. Create a new Laravel project

Run the following on your command line to…


With social authentication, users do not have to fill out forms in order to register on your website; they also do not need to remember another password in other to access their accounts on your website. This article will provide a step-by-step process to add Twitter authentication to your website

Assumptions:

This tutorial assumes that you have PHP and Composer installed on your computer. It also uses XAMPP’s Apache and MySQL installations. It is therefore assumed that the reader is familiar with XAMPP. Visit the Composer and XAMPP websites to download them.

1. Create a new Laravel project

Run the following on your command line to…


With social authentication, users do not have to fill out forms in order to register on your website; they also do not need to remember another password in other to access their accounts on your website. This article will provide a step-by-step process to add GitHub authentication to your website

Assumptions:

This tutorial assumes that you have PHP and Composer installed on your computer. It also uses XAMPP’s Apache and MySQL installations. It is therefore assumed that the reader is familiar with XAMPP. Visit the Composer and XAMPP websites to download them.

1. Create a new Laravel project

Run the following on your command line to…


With social authentication, users do not have to fill out forms in order to register on your website; they also do not need to remember another password in other to access their accounts on your website. This article will provide a step-by-step process to add Facebook authentication to your website

Assumptions:

This tutorial assumes that you have PHP and Composer installed on your computer. It also uses XAMPP’s Apache and MySQL installations. It is therefore assumed that the reader is familiar with XAMPP. Visit the Composer and XAMPP websites to download them.

1. Create a new Laravel project

Run the following on your command line to…

Kenpachi Zaraki

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