File tree Expand file tree Collapse file tree 5 files changed +101
-0
lines changed Expand file tree Collapse file tree 5 files changed +101
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ |--------------------------------------------------------------------------
5+ | Broadcast Channels
6+ |--------------------------------------------------------------------------
7+ |
8+ | Here you may register all of the event broadcasting channels that your
9+ | application supports. The given channel authorization callbacks are
10+ | used to check if an authenticated user can listen to the channel.
11+ |
12+ */
13+
14+ Broadcast::channel ('App.User.{id} ' , function ($ user , $ id ) {
15+ return (int ) $ user ->id === (int ) $ id ;
16+ });
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Tests ;
4+
5+ use Illuminate \Contracts \Console \Kernel ;
6+
7+ trait CreatesApplication
8+ {
9+ /**
10+ * Creates the application.
11+ *
12+ * @return \Illuminate\Foundation\Application
13+ */
14+ public function createApplication ()
15+ {
16+ $ app = require __DIR__ .'/../bootstrap/app.php ' ;
17+
18+ $ app ->make (Kernel::class)->bootstrap ();
19+
20+ return $ app ;
21+ }
22+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Tests \Feature ;
4+
5+ use Tests \TestCase ;
6+ use Illuminate \Foundation \Testing \WithoutMiddleware ;
7+ use Illuminate \Foundation \Testing \DatabaseMigrations ;
8+ use Illuminate \Foundation \Testing \DatabaseTransactions ;
9+
10+ class ExampleTest extends TestCase
11+ {
12+ /**
13+ * A basic test example.
14+ *
15+ * @return void
16+ */
17+ public function testBasicTest ()
18+ {
19+ $ response = $ this ->get ('/ ' );
20+
21+ $ response ->assertStatus (200 );
22+ }
23+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Tests \Unit ;
4+
5+ use Tests \TestCase ;
6+ use Illuminate \Foundation \Testing \DatabaseMigrations ;
7+ use Illuminate \Foundation \Testing \DatabaseTransactions ;
8+
9+ class ExampleTest extends TestCase
10+ {
11+ /**
12+ * A basic test example.
13+ *
14+ * @return void
15+ */
16+ public function testBasicTest ()
17+ {
18+ $ this ->assertTrue (true );
19+ }
20+ }
Original file line number Diff line number Diff line change 1+ const { mix } = require ( 'laravel-mix' ) ;
2+
3+ /*
4+ |--------------------------------------------------------------------------
5+ | Mix Asset Management
6+ |--------------------------------------------------------------------------
7+ |
8+ | Mix provides a clean, fluent API for defining some Webpack build steps
9+ | for your Laravel application. By default, we are compiling the Sass
10+ | file for the application as well as bundling up all the JS files.
11+ |
12+ */
13+
14+ mix . js ( 'resources/assets/js/app.js' , 'public/js' )
15+ . sass ( 'resources/assets/sass/app.scss' , 'public/css' ) ;
16+
17+ mix . browserSync ( {
18+ proxy : 'web:8000' ,
19+ open : false
20+ } ) ;
You can’t perform that action at this time.
0 commit comments