Ya pretty thorough lol

[6:01] 
So run `php artisan make:addon keevitaja.module.homepage`

keevitaja [6:01 PM] 
done

ryanthompson [6:01 PM] 
And now `php artisan make:stream products keevitaja.module.homepage`

keevitaja [6:02 PM] 
done

ryanthompson [6:02 PM] 
Ok now run `php artisan module:install keevitaja.module.homepage`

[6:02] 
And you should be able to get there via the CP now (but pry get a 404)

keevitaja [6:02 PM] 
fone

ryanthompson [6:03 PM] 
You’ll see the routes for products generated in your addons resources/routes/products.php

[6:03] 
Copy those and put them in the routes array of your addons’ service provider

[6:04] 
And you’ll wanna remove the trailing “/products” from it since it’s your addons default section - we want just "admin/homepage"

[6:04] 
Also change “example” to “products” in your HomepageModule.php class

[6:04] 
Let me know when you get there

keevitaja [6:05 PM] 
k, i think i am done

ryanthompson [6:06 PM] 
Can you reload and get an empty table?

[6:06] 
at admin/homepage (edited)

keevitaja [6:06 PM] 
http://i.imgur.com/4AfK4Io.png (67KB)


ryanthompson [6:07 PM] 
Great

[6:07] 
So real quick

[6:07] 
Open that fields migration (first one)

[6:07] 
and add ‘name’ => ‘anomaly.field_type.text'

[6:07] 
Then open your products stream one and add ‘name’ to the assignments

keevitaja [6:08 PM] 
done

ryanthompson [6:08 PM] 
then run `php artisan migrate:refresh --addon=keevitaja.module.homepage`

[6:08] 
Now your homepage_products table should have a name column in it

[6:08] 
and admin/homepage/create should have the field

[6:09] 
You see it?

keevitaja [6:09 PM] 
http://keevitusseadmed.app/admin/homepage/create not found, 404

ryanthompson [6:09 PM] 
What’s your routes array

keevitaja [6:10 PM] 
protected $routes = [
       'admin/homepage' => 'Keevitaja\HomepageModule\Http\Controller\Admin\ProductsController@index',
       'admin/homepage/products/create' => 'Keevitaja\HomepageModule\Http\Controller\Admin\ProductsController@create',
       'admin/homepage/products/edit/{id}' => 'Keevitaja\HomepageModule\Http\Controller\Admin\ProductsController@edit'
   ];

ryanthompson [6:10 PM] 
So that’s not routed - you wanna remove products from that entire set

[6:10] 
admin/homepage/create

keevitaja [6:10 PM] 
http://keevitusseadmed.app/admin/homepage/products/create

ryanthompson [6:10 PM] 
Just cause it’s the first section

keevitaja [6:10 PM] 
this is working ... ok

ryanthompson [6:11 PM] 
Ok - so from here - you can repeat steps and add detail to your definitions. You can build it the thorough way or the quick way or any mixture of the two - I have to say - watch that video lol

[6:11] 
It will tell you about the lang keys vs hard coded strings / field configurations / translations / etc / etc

[6:12] 
But it would take me more than 1.5 hours to type it for you ^_^

[6:12] 
Just wanted to get you on the right path

keevitaja [6:12 PM] 
http://i.imgur.com/nlQJkWj.png (69KB)

why there is number one instead of the string?

ryanthompson [6:12 PM] 
Because you haven’t configured your table builder

[6:12] 
(also in the vid / other addons you can checkout)

keevitaja [6:13 PM] 
ok, i think i can now use redirection plugin or something

[6:13] 
what if i need to add fields?

ryanthompson [6:13 PM] 
By default it’s the title column which is the ID since you didn’t define one

keevitaja [6:13 PM] 
to the existing addon

ryanthompson [6:13 PM] 
just add them and refresh your migrations under that addon

[6:13] 
And use the make:stream to add more stream migrations

[6:14] 
That video is like gold though I think you’ll understand things much better after it

keevitaja [6:14 PM] 
and how do i iterate over the streams items?

ryanthompson [6:15 PM] 
You can use the entries plugin or if you assign a multiple field type to the page related to your home page products then you can iterate through them on the page like for product in page.products or whatever your field is

[6:15] 
And that’s covered in the other video I put up

[6:15] 
Actually - the same video

[6:15] 
it goes over all that shit lol

keevitaja [6:15 PM] 
ok, thank you so much

ryanthompson [6:15 PM] 
Sure thing!

keevitaja [6:16 PM] 
and a tip for the screencasts. at least double your fontsize

ryanthompson [6:16 PM] 
ya 30” screen and didn’t do shit to it for readability :disappointed:

[6:16] 
Noob

[6:16] 
That was my 1st and 2nd ever lol