Usage with Larupload
Follow these steps to set up Larupload and integrate it with your project:
Install Larupload using this documentation
Add Larupload Columns to Your Table:
In your migration file, add Larupload columns to your table. Here's an example:
<?php
use Mostafaznv\Larupload\Enums\LaruploadMode;
class CreateMediaTable extends Migration
{
public function up()
{
Schema::create('media', function (Blueprint $table) {
$table->id();
$table->upload('video', LaruploadMode::LIGHT);
$table->timestamps();
});
}
}Add Larupload Trait to Your Model:
Next, add the Larupload trait to your model. Define upload entities as needed. Here's an example:
Add NovaVideo Field to Your Resource:
In your Nova resource, add the NovaVideo field for the video column. Configure it as needed. Here's an example:
Last updated