PHP code example of steadfastcollective / laravel-summit
1. Go to this page and download the library: Download steadfastcollective/laravel-summit 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/ */
steadfastcollective / laravel-summit example snippets
namespace App\Models;
use SteadfastCollective\Summit\Models\Course as SummitCourse;
class Course extends SummitCourse
{
protected $appends = [
'hello_world',
];
public function getHelloWorldAttribute()
{
return 'Hello World!';
}
}
/*
|--------------------------------------------------------------------------
| Course Model
|--------------------------------------------------------------------------
|
| Which class should we reference as the course model? It's used
| to store and retrieve the courses.
|
*/
'course_model' => \SteadfastCollective\Summit\Models\Course::class,
/*
|--------------------------------------------------------------------------
| Course Block Model
|--------------------------------------------------------------------------
|
| Which class should we reference as the course block model? It's used
| to store and retrieve the course blocks.
|
*/
'course_block_model' => \SteadfastCollective\Summit\Models\CourseBlock::class,
/*
|--------------------------------------------------------------------------
| User Model
|--------------------------------------------------------------------------
|
| Which class should we reference as the user model? It'll be used when
| associating course blocks with users (for tracking their progress).
| If null, we'll fallback to the model used in your `auth.php` file.
|
*/
'user_model' => null,
/*
|--------------------------------------------------------------------------
| Video Storage
|--------------------------------------------------------------------------
|
| Where should we retrieve and upload your videos? We have built-in
| support for Laravel's Filesystem and api.video
|
*/
'video_storage_driver' => \SteadfastCollective\Summit\VideoStorage\FilesystemDriver::class,
// Only
/*
|--------------------------------------------------------------------------
| Video Storage
|--------------------------------------------------------------------------
|
| Where should we retrieve and upload your videos? We have built-in
| support for Laravel's Filesystem and api.video
|
*/
'video_storage_driver' => \SteadfastCollective\Summit\VideoStorage\ApiVideoDriver::class,