Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

SabatinoMasala/faceless-laravel-example

122 stars
1 code files
View SabatinoMasala/faceless-laravel-example on GitHub

app/Http/Controllers/StoriesController.php

Open in GitHub
use App\Jobs\BrainstormStoryTitle;
use App\Jobs\ChunkTranscript;
use App\Jobs\CreativeDirection;
use App\Jobs\GenerateImages;
use App\Jobs\GenerateStory;
use App\Jobs\GenerateVoiceOver;
use App\Jobs\RenderVideo;
use App\Jobs\TranscribeAudio;
use App\Models\Story;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Bus;
 
class StoriesController extends Controller
{
// ...
 
public function store()
{
$story = Story::create([
'status' => 'PENDING',
'user_id' => Auth::user()->id,
'series' => request('subject'),
'language' => 'English'
]);
Bus::chain([
new BrainstormStoryTitle($story),
new GenerateStory($story),
new GenerateVoiceOver($story),
new TranscribeAudio($story),
new ChunkTranscript($story),
new CreativeDirection($story),
new GenerateImages($story),
// -> The Batch from GenerateImages is added here
new RenderVideo($story)
])->dispatch();
return response()->redirectTo(route('stories.show', $story));
}
 
// ...
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.