Skip to content

Instantly share code, notes, and snippets.

@vmitchell85
Created June 23, 2018 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vmitchell85/f5f476e79917d26eedfef61040ff41c1 to your computer and use it in GitHub Desktop.
Save vmitchell85/f5f476e79917d26eedfef61040ff41c1 to your computer and use it in GitHub Desktop.
Larastream 2.0 sample routes
<?php
Route::get('/streams', 'StreamController@index'); // List of all streams
Route::post('/streams', 'StreamController@store'); // Creates a new stream - If a stream starts now, it could do the logic for that as well
Route::get('/streams/{stream}', 'StreamController@show'); // Shows an existing stream
Route::get('/streams/{stream}/edit', 'StreamController@edit'); // Shows the page to edit a stream
Route::patch('/streams/{stream}', 'StreamController@update'); // Route where edits are saved for a stream
Rotue::post('/streams/{stream}/live', 'LiveStreamController@store'); // Starts a stream
Rotue::delete('/streams/{stream}/live', 'LiveStreamController@destroy'); // Ends a stream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment