This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This is an example code for how to use nested RESTful controllers | |
* in Laravel 4 & 5. Yes, in this case you could you use a resource | |
* controller but sometimes you don't have the same method names | |
* as a resource controller. The method names in this example weren't | |
* my case so it's just some example code. | |
* | |
* You can also use static function calls instead of OOP way. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Facades\Blade; | |
use Illuminate\Support\ServiceProvider; | |
class BladeServiceProvider extends ServiceProvider | |
{ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Http\Request; | |
/* | |
|-------------------------------------------------------------------------- | |
| API Routes | |
|-------------------------------------------------------------------------- | |
| | |
| Here is where you can register API routes for your application. These |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\Api; | |
use Pusher\Pusher; | |
use Illuminate\Http\Request; | |
use App\Http\Controllers\Controller; | |
class BroadcastAuthController extends Controller | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="{{ route('broadcast') }}" method="post"> | |
{{ csrf_field() }} | |
<input type="text" name="message"> | |
<button class="btn btn-default">Submit</button> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use App\Events\SendMessage; | |
use Illuminate\Http\Request; | |
/* | |
|-------------------------------------------------------------------------- | |
| Web Routes | |
|-------------------------------------------------------------------------- | |
| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Events; | |
use Illuminate\Broadcasting\Channel; | |
use Illuminate\Queue\SerializesModels; | |
use Illuminate\Broadcasting\PrivateChannel; | |
use Illuminate\Broadcasting\PresenceChannel; | |
use Illuminate\Foundation\Events\Dispatchable; | |
use Illuminate\Broadcasting\InteractsWithSockets; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uncomment the next line to define a global platform for your project | |
# platform :ios, '9.0' | |
target 'Pusher' do | |
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks | |
use_frameworks! | |
# Pods for Pusher | |
pod 'Alamofire' | |
pod 'SwiftyJSON' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert('Dit is code injection!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Product extends Model | |
{ | |
/** | |
* The table associated with the model. |
OlderNewer