When we first contructed our Laravel tennis club application we used Composer the PHP dependency package management system. This downloaded Laravel and a whole range of third party packages on which Laravel depends. We then added the Infyom generator, and the packages on which depends - also using Composer. Later when we used FullCalendar, the [...]
Category: Home - All Categories
This category contains pages for each of the category lists
Laravel Breeze
Laravel Breeze started development in 2011 as a package to provide a main set of functionality around user Login. More recently it has been folded in as the main approach to Laravel User Login and authentication as a "Starter Kit". The default set of views around this are based on blade styled with tailwind.css. In [...]
Modifying the Navbar to allow for User Login Links
Create a new file in resources\views\layouts called navAuth.blade.php use the following code <ul class="navbar-nav text-white"> <li class="nav-item"> <a class="nav-link" href="#register">Register</a> </li> <li class="nav-item"> <a class="nav-link" href="#login">Login</a> </li> <li class="nav-item"> <a class="nav-link" href="#logoff">Logoff</a> </li> </ul> Now modify your parent view - resources/views/layouts/app.blade.php - add in the line highlighted in red below in order to pull-in the [...]
Using the Logged in User's ID within your Application
Now that we have the ability to login there are things that we can do with the user's login information to improve the user experience and ease of use of the application in relation to certain use cases within the application. Once the user has logged in, it should no longer be necessary for the [...]
Using the Logged In User's ID to Create a Booking
Now that we have done the hard work of making a relationship both at database and Object level between the Users and Member tables the next step is relatively straightforward. Open the file resources/views/booking/fields.blade.php. Find the code we added previously which created a dropdown list of members - as follows We can now remove this [...]
Roles and Permissions - Step 1 - Using Roles and Permissions to Secure your System
As the systems you build become more sophisticated you will find it necessary to implement more elaborate security based on the different roles the users of your system are acting in. In the tennisclub example we have been using there could reasonably be a number of roles including, System Admin, Club Secretary, Club Coach and [...]
Roles and Permissions - Step 2 - Creating a Simple UI to Create and Assign Roles and Permissions for Spatie - Laravel-permission
In the last post we installed Laravel-permission. This package provides us with database tables and an API to store and manage roles and permissions. Unfortunately, this still leaves us having to write a significant amount of code in order to assign users into roles and assign permissions to roles. Rather than doing all this through [...]
Creating a Simple Shopping Cart Application - Step 1 - Creating the Database and Shop Window
In this series of posts we are going to build a simple shopping cart application. To do this we will depart from the tennis club application we have been building and create a new laravel application. Follow the steps from the getting started section to create a new laravel application and ensure the Infyom generator [...]
Creating a Simple Shopping Cart Application - Step 2 - Adding a Navbar and Cart
In this post we will extend the functionality of the shop window with a navbar showing the number of items in the cart and two navbar buttons to empty the cart or proceed to the checkout page. Edit the file resources/views/products/displaygrid.blade.php and add the following code a the top of the page after the @section('content') [...]
Creating a Simple Shopping Cart Application - Step 3 - Loading the number of Cart Items from the session and clearing the cart
The cart is now working well and the cart contents are stored in a session so even if the user leaves the page the information will not be lost. When we created the page in step 1 we included a div called 'cart' which would indicate the number of items in the cart this was [...]