PHP code example of hoppermagic / kobalt

1. Go to this page and download the library: Download hoppermagic/kobalt library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

hoppermagic / kobalt example snippets

`
php artisan make:auth
php artisan migrate
`
// From 5.8?
 
Auth::routes(['register', false]);

OR

//!TODO MAKE SURE YOU USE THE ONES FROM ROUTER.PHP
// Authentication Routes...
Route::get('login', 'Auth\LoginController@showLoginForm')->name('login');
Route::post('login', 'Auth\LoginController@login');
Route::post('logout', 'Auth\LoginController@logout')->name('logout');

// Password Reset Routes...
Route::get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request');
Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email');
Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset');
Route::post('password/reset', 'Auth\ResetPasswordController@reset');
`
Route::group([
        'namespace' => 'Admin',
        'prefix' => 'admin',
        'as' => 'admin.']
    ,function(){

        // STORIES
        Route::get('story/{story}/confirmdel', [
            'as' => 'story.confirmdel',
            'uses' => 'StoriesController@confirmDelete'
        ]);
        Route::resource('/story', 'StoriesController', [
            'except' => ['show'],
        ]);

        // STORY IMAGES
        Route::get('story/{story}/storyimage/{storyimage}/confirmdel', [
            'as' => 'story.{story}.storyimage.{storyimage}.confirmdel',
            'uses' => 'StoryImageController@confirmDelete'
        ]);
        Route::get('/story/{story}/storyimage/createbulk', 'StoryImageController@createBulkUpload')->name('storyimage.createbulk');
        Route::post('/story/{story}/storyimage/storebulk', 'StoryImageController@storeBulkUpload')->name('storyimage.storebulk');
        Route::resource('/story/{story}/storyimage', 'StoryImageController', [
            'except' => ['show','index'],
        ]);
        
        // Stories ajax routes
        Route::post('story/{story}/edit/imageload', 'StoriesController@imageGalleryLoad');
        Route::post('story/{story}/edit/imagesort', 'StoriesController@imageGallerySort');
        Route::post('story/sort', 'StoriesController@overviewSort');
    }
);

`
php artisan vendor:publish --provider="Hoppermagic\Kobalt\KobaltServiceProvider" --tag=default --force
`
php artisan vendor:publish --provider="Hoppermagic\Kobalt\KobaltServiceProvider" --tag=css-js --force
`
php artisan make:ko-resources Rabbit
php artisan make:ko-controller Rabbit
php artisan make:ko-form Rabbit