In Progress A coding tutorial website developed with Laravel 5.6 with Laravel Voyager as the admin. Overall, a project to test all things Laravel.
- Clone or download this repo
- Create a .env file using the .env.example file
- From the root of this repo, run
composer install
- Generate a new app key by running
php artisan key:generate
- Create a virtual host pointing to the
public
directory - Create a MySQL database and fill in the appropriate environment variables
- Import the the
tutshub.sql
file found under thebackups/
folder. - Now running
php artisan server
should now allow you to go to http://localhost:8000/ or http://yourvhost/ - Navigate to http://localhost:8000/admin or http://yourvhost/admin
- You should be greeted by the voyager admin screen
- Note: Images will look funky but we'll fix that in a few
- The default credentials are
admin@admin.com
/password
- Also provided are
swalsh@gmail.com
/password
andkmayer@gmail.com
/password
, users with a customcontent editor
role - Once logged in, you should get a warning from Voyager about the missing symlink. Click the
fix it
button and the error should go away. - From here, upload the folder structure found in the provided
backups/storage.tar.gzip
orzip
file. Replace the files found in yourpublic/storage/
folder and yourstorage/app/public
folder (Sadly you will have to manually rename each file). If a user's profile avatar does not appear, go to Users, edit each user and re-assign their profile avatar. Feel free to delete the backups directory once everything is working - If you would like to continue on with this project and work with the sass files, run
npm install
. Once done, running any of the default yarn commands should work. See thepackage.json
for available commands.
- Follow steps 1 to 4 from the non-homestead project setup
- Ensure to install all dependencies required to use Homestead
- (note: you don't have to install Homestead globally)
- Run
composer install
and thennpm install
- Add a vhost pointing to the IP listed at the top of the
Homestead.yaml
file - Do step 15 from the non-homestead project setup (Ignore the user profile avatars until you have access to the actual site)
- Now, you are ready to run
vagrant up
- Once the VM is up, check that you can now hit your vhost. You will see an error at first
- Next, follow the instructions stated in this post to import the
tutshub.sql
backup. Update the .env database table appropriately. - Check that the newly created database contains 21 tables.
- Now you should be able to see the Tutshub home page when hitting the vhost.
- All that's left is to follow steps 12 & 13 in the other project setup instructions to navigate to the Voyager admin.
Happy dev-ing!
- If you use a password management extension (like Last Pass) on your development environment, you may find issues when trying to edit users. Personally, I've faced errors with duplicate emails because LastPass autofills the email edit field. So, either disable lastpass for your local site or use a browser that doesn't have LastPass installed.
- Widgets can be found at
app/Widgets
- Widget images are stored in
public/images
MyUsersSeeder
- Creates 50 random instances of theTCG\Voyager\Models\User
UserFactory
- In addition to defining a new User instance, the factory will also write to a newseeded_users.txt
file so that you may log in with any of the newly created users. This file should remain in the.gitignore
file.
php artisan make:vwidget widget_name model_name
- A quick command for generating the voyager widget boilerplate. Not 100% perfect but does the job. You will have to manually add the widget to your voyager.config file
widget_name
- Name of widget. Can include the 'Dimmer' or 'Widget' prefix. Just note that "widget" will appear in some of the description text. Easily editablemodel_name
- Just the name of the model. Assumes that model is using the default namespace\App\
.- Will be prompted for which voyager icon to use on the widget. Defaults to
voyager-helm
- Also will set a default.jpg for the widget's background
Read More about this project's roadmap and how to further customize voyager in the wiki