Blog

Here’s an overview of what you could use while developing a project with Laravel.
In order to create controllers, models, migrations, … we can use artisan.

Creating a Controller

php artisan make:controller MyController

When we want artisan to provide a controller with the “resource functions” (index, create, store, show, edit, update, destroy) predefined for us, we can simply add “–resource” to our command to provide these functions out of the box.

php artisan make:controller MyController --resource

Creating a Model

php artisan make:model

If you want artisan to provide a migration file related to our newly created model, you can just add “-m” to the command. Which gives us something like this:

php artisan make:model -m

Creating a Migration file

We’re also able to create our own migration file, for example is we want to add field to an existing table or create a pivot table, or …

php artisan make:migration the_name_of_your_migration

Just like the migration file that artisan provided for us when we used -m on the creation of a model, the migration file will be added to the /database/migrations folder.

Deploy the migration file(s) to the database

In order to get our migration file(s) migrated into the database, we need to tell artisan to migrate them. Like so:

php artisan migrate

Be aware that once a migration file has been migrated to the database, all changes to the file afterwards will be discarded. We’ll need to create a new migration file in order to add additional changes / migrations. In the database you can see the hierarchy of the migrations in the table “migrations”.

Installing Laravel

Installing Laravel and getting your project going is quite easy, if you know how to do it. So here we go!

First of all you’ll need a local server.
You’ll be needing at least PHP version 7.1.3. and I’m currently working on PHP 7.2.

I prefer to install Laravel globally. Use the following command on your terminal.

composer global require "laravel/installer"

After Laravel is installed you can run the simple command.

laravel new myFirstProject

And it will create a new folder for you with the name myFirstProject with a fresh installation of Laravel in it.

The next step is to set up your vhost to your folder. (don’t forget to link it to the public folder)
Once this is done, you’ll be able to browse to your newly created project using the browser of your choosing.

Installing Laravel using these steps will automatically result in a secure installation, meaning that there will be a Application Key generated for you.

Setting up the database

Setting up a database for your project will be quite easy because we will be using the power of artisan to build our project.
The only thing you need to do manually is creating an empty database. Afterwards you’ll need to put in the credentials into the .env file, right over here:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

When this is done we can start using the database.

From this point forward you can start developing your project!

Playing with bikes

During the weekend of 9 & 10 June the NFM Cup took place in “Vierhouten” the Netherlands.

We decided to make little vacation out of it, by traveling over there 2 days earlier.
So we arrived at the camping site on Thursday the 7th together with our friend Johan.
Upon arrival it was extremely hot, it was 35°C with a humidity of 95%.

On Friday the 8th we had a rainy morning which got the temperature down, making it more bearable for the coming event.
In the early morning I went for a run as promised during the evening the day before between gin-tonics.

And afterwords we chilled and played some UNO, because it was still raining.

Uno in de regen… #cards #winning

A post shared by Bert De Swaef (@burtds) on

On saturday it was competition time and we played our first freestyle round, which we performed smoothly.
Maybe the past run we ever did.

action shot of Luna and Bert's freestyle run
Picture by Peter Voort !

Later that day Johan played his first Distance rounds with Silver and Sky.
He would be ending up in the top 10 with both his dogs.

On Sunday Johan also played his first Freestyle round in the morning, and he totally nailed it.
If I remember correctly there were only 4 non-catches and as always his flow was spot on.
Just past the noon, Luna and I were lined up for our first distance round, which we totally screwed up, only 1 catch.

In the later afternoon both Johan and I had to play the finals.
First off was Johan with both his dogs in the distance final he ended up getting a 2nd place with Sky and got qualifier for the World Cup ! CONGRATZ MATE !

Afterwords it was our turn to play the finals in the novice freestyle, which didn’t go as planned due to some extra nerves because I was in the first position after the Saturday run.
Shortly after we played it was Johan his turn to play the finals with Silver. Agina they played a solid run.
He was in second for the freestyle after all the competitors played on Saturday and it was super close with Sandra, so actually nobody had an idea of who would take home the win.

After clearing the field of party tents, it was podium time.

Even though I wasn’t that satisfied with my 2nd run, we took home the win in the Freestyle novice class.
And Johan also took home the win in the Freestyle open class.

Podium of the Freestyle novice class

After a few months of silence we are now officially sponsored by Farmfood.

We’re super excited about it!

During the weekend of 26 & 27 of May we traveled to Assen.
On Sunday the 27th there was a Dogfrisbee competition hosted by Gesien and het crew.

The location was perfect, lots of green and 2 playing fields, so the 2 disciplines would be played at the same time.
Which speeds up the event.

As it was our first competition of the year, we weren’t have any expectations.

It started off great, the wind was good and we made the correct disc choice. Ended up playing a solid Toss & Fetch run with 4 throws and 4 catches inches away from the bonus zone.

During the noon it was time to play our freestyle routine. It would be our first time playing the new routine after the diagnosis that forced us the adjust our play for Luna her hips.
Even with a lot of nerves we played a quite good run.

In the afternoon we had to do another Toss & Fetch run. At this point it went wrong in any possible way. The throws where quite good but Luna was suffering from the heat that day, resulting in 4 throws and 0 catches. This could ruin the hole day.
Also the 2nd Freestyle run wasn’t as good as the first one, due to even more nerves remaining from the failed 2nd Toss & Fecth run.

Totally unexpected we ended up winning the Toss & Fetch beginners class even with 0 catches in the 2nd run.
And maybe even more unexpected we brought home the 2nd place in the Freestyle beginners class.

Podium time #onsluna #dogfrisbee #discdog #farmfood

A post shared by Bert De Swaef (@burtds) on