Craigs Portfolio

1. Introduction & Setup of Laravel

Introduction

These blogs are to document the creation of my own Ultra Simple Content Management System. I am building this using Laravel and an AWS server to host it (Linux – Ubuntu). The main reason of these blogs are for part of my Server Side Systems assessment.  As part of the assessment I am following Laracasts website for a tutorial on how to learn Laravel, the tutorial is based on Laravel 6 and I am using Laravel 8 so expecting lots of different issues to arise. As such I am expecting to have quite a few blogs with my experience and how I was able to resolve any issues I have.

The main functionality required in the Laravel CMS is CRUD, Models (DB Design & Validation), User Accounts & Authentication, Specialised Techniques, UI Techniques and Improvements, Aesthetic Design with the Layouts and CSS.

Setup

I will start with the install and setup of Laravel which as gone anything but smoothly. I have sort of started Laravel and I am around 3 weeks behind in my class so will document this up to date as I go.

The install of Laravel was done via Command Line Interface (CLI) which has gone smoothly as I followed instructions.

However, when it has come to setting it up in VS Code, it has gone awry.

I have my config file setup properly and it works however it is causing errors in my command line and making me unable to connect to the server.

Host b00132629.duckdns.org
HostName b00132629.duckdns.org
LogLevel verbose
IdentityFile ~/.ssh/sss01.key
User ubuntu

I had to enter this within the settings as an absolute path due to the config making the identity file as “C:\Bleh\Users//.ssh///sss01.key” when entered normally which would error.
This has an effect on my command line now giving me the error:

C:\Users\Bleh>ssh -L 8000:localhost:8000 -L 8080:localhost:80 -L 5901:localhost:5901 -L 3306:localhost:3306 -i C:\Users\Bleh\sss01.pem ubuntu@b00132629.duckdns.org
Bad owner or permissions on C:\Users\Bleh/.ssh/config

I found this to be extremely frustrating as I like to use the CLI and will require it for MySQL/Sudo code.  I found the above error was a bug on Windows OS build 1803 so I updated Windows to no avail unfortunately. I tried various different commands and ways to setup the VS Code config file within the .ssh, mainly from information on Microsoft forums and Stack Overflow. I ended up leaving it as a .key instead of a .pem as it works fine. The only work around I found to be able to use CLI without deleting/renaming the config file is to use Git Shell.

As this seems to work fine and does everything I need it to do, I will just use this instead of CLI.

Update: PowerShell is not saving changes at random, some changes apply and some do not, repeat the changes and it works and sometimes doesn’t work.
VS Code keeps randomly disconnecting, most times I lose what I was working on sometimes it reconnects without any issues.
Swapped to PhpStorm instead of VS Code. Got annoyed trying to learn how to work PhpStorm.

Works fine on my laptop so issue is OS related, I just don’t have the time to sit and try work out what it is. Not using my laptop as I run on 2 screens on desktop and it’s not worth the hassle to swap and swap between each time I want to do Laravel work.
Wasted too much time faffing with this, gonna work offline via xampp and upload it manually via ftp or to my own hosting.

Server Side Systems

5. Conclusion

Conclusion Overall I had a lot of issues and I made a lot of major stupid mistakes in this project. I couldn’t get started due

Read More »
Server Side Systems

4. UI Techniques

Reorder Lists I originally tried setting up the reorder lists by using the database. I was using lft, rgt and depth which was used in

Read More »
Server Side Systems

3. CRUD & Rules

CRUD After migrating to the database I can now build the CRUD on each of these automatically using backpack commands as shown below. For each

Read More »