File tree Expand file tree Collapse file tree 22 files changed +636
-1
lines changed Expand file tree Collapse file tree 22 files changed +636
-1
lines changed Original file line number Diff line number Diff line change
1
+ _ide_helper.php
2
+ .php_cs.cache
3
+ .phpstorm.meta.php
4
+ .phpunit.result.cache
5
+ /vendor
6
+ node_modules /
7
+ npm-debug.log
8
+ composer.phar
9
+ yarn-error.log
10
+ * .bak
11
+
12
+ # Laravel 4 specific
13
+ bootstrap /compiled.php
14
+ app /storage /
15
+
16
+ # Laravel 5 & Lumen specific
17
+ public /storage
18
+ public /hot
19
+ storage /* .key
20
+ storage /settings.json
21
+ storage /* .sqlite
22
+ .env. * .php
23
+ .env.php
24
+ .env
25
+ .env.bak
26
+ env.php
27
+ .env.generated
28
+ .vagrant
29
+ # Homestead.yaml
30
+ Homestead.json
31
+ LocalValetDriver.php
32
+
33
+ # Rocketeer PHP task runner and deployment package. https://github.com/rocketeers/rocketeer
34
+ .rocketeer /
35
+
36
+ tmp /
37
+
38
+ # intellij files
39
+ .idea /composerJson.xml
40
+ .idea /** /workspace.xml
41
+ .idea /** /tasks.xml
42
+ .idea /dictionaries
43
+ .idea /** /dataSources /
44
+ .idea /** /dataSources.ids
45
+ .idea /** /dataSources.xml
46
+ .idea /** /dataSources.local.xml
47
+ .idea /** /sqlDataSources.xml
48
+ .idea /** /dynamic.xml
49
+ .idea /** /uiDesigner.xml
50
+ .idea /** /gradle.xml
51
+ .idea /** /libraries
52
+ cmake-build-debug /
53
+ .idea /** /mongoSettings.xml
54
+ * .iws
55
+ out /
56
+ .idea_modules /
57
+ atlassian-ide-plugin.xml
58
+ .idea /replstate.xml
59
+ com_crashlytics_export_strings.xml
60
+ crashlytics.properties
61
+ crashlytics-build.properties
62
+ fabric.properties
63
+ .idea
64
+ phpvms.iml
65
+ phpvms_next.iml
66
+
67
+ # Gradle:
68
+ public /info.php
69
+
70
+ # Error Logs
71
+ error_log
72
+
73
+ .sass-cache
74
+ .DS_Store
75
+ /config.php
76
+ /VERSION
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Modules \Sample \Awards ;
4
+
5
+ use App \Contracts \Award ;
6
+
7
+ /**
8
+ * Class SampleAward
9
+ */
10
+ class SampleAward extends Award
11
+ {
12
+ public $ name = 'Sample Award ' ;
13
+
14
+ /**
15
+ * This is the method that needs to be implemented.
16
+ * You have access to $this->user, which holds the current
17
+ * user the award is being checked against
18
+ *
19
+ * @param null $params Parameters passed in from the UI
20
+ *
21
+ * @return bool
22
+ */
23
+ public function check ($ params = null ): bool
24
+ {
25
+ return false ;
26
+ }
27
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ return [
4
+ 'name ' => 'Sample ' ,
5
+ ];
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Modules \Sample \Database \Seeders ;
4
+
5
+ use Illuminate \Database \Eloquent \Model ;
6
+ use Illuminate \Database \Seeder ;
7
+
8
+ class SampleDatabaseSeeder extends Seeder
9
+ {
10
+ /**
11
+ * Run the database seeds.
12
+ *
13
+ * @return void
14
+ */
15
+ public function run ()
16
+ {
17
+ Model::unguard ();
18
+
19
+ // $this->call("OthersTableSeeder");
20
+ }
21
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Modules \Sample \Http \Controllers \Admin ;
4
+
5
+ use App \Contracts \Controller ;
6
+ use Illuminate \Http \Request ;
7
+
8
+ /**
9
+ * Class AdminController
10
+ */
11
+ class AdminController extends Controller
12
+ {
13
+ /**
14
+ * Display a listing of the resource.
15
+ */
16
+ public function index ()
17
+ {
18
+ return view ('sample::admin.index ' );
19
+ }
20
+
21
+ /**
22
+ * Show the form for creating a new resource.
23
+ */
24
+ public function create ()
25
+ {
26
+ return view ('sample::admin.create ' );
27
+ }
28
+
29
+ /**
30
+ * Store a newly created resource in storage.
31
+ */
32
+ public function store (Request $ request )
33
+ {
34
+ }
35
+
36
+ /**
37
+ * Show the specified resource.
38
+ */
39
+ public function show ()
40
+ {
41
+ return view ('sample::admin.show ' );
42
+ }
43
+
44
+ /**
45
+ * Show the form for editing the specified resource.
46
+ */
47
+ public function edit ()
48
+ {
49
+ return view ('sample::admin.edit ' );
50
+ }
51
+
52
+ /**
53
+ * Update the specified resource in storage.
54
+ */
55
+ public function update (Request $ request )
56
+ {
57
+ }
58
+
59
+ /**
60
+ * Remove the specified resource from storage.
61
+ */
62
+ public function destroy ()
63
+ {
64
+ }
65
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Modules \Sample \Http \Controllers \Api ;
4
+
5
+ use App \Contracts \Controller ;
6
+ use Illuminate \Http \Request ;
7
+
8
+ /**
9
+ * Class SampleController
10
+ */
11
+ class SampleController extends Controller
12
+ {
13
+ /**
14
+ * Just send out a message
15
+ *
16
+ * @param Request $request
17
+ *
18
+ * @return \Illuminate\Http\JsonResponse
19
+ */
20
+ public function index (Request $ request )
21
+ {
22
+ return $ this ->message ('Hello, world! ' );
23
+ }
24
+
25
+ /**
26
+ * @param Request $request
27
+ *
28
+ * @return \Illuminate\Http\JsonResponse
29
+ */
30
+ public function hello (Request $ request )
31
+ {
32
+ // Another way to return JSON, this for a custom response
33
+ // It's recommended to use Resources for responses from the database
34
+ return response ()->json ([
35
+ 'name ' => Auth::user ()->name ,
36
+ ]);
37
+ }
38
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Modules \Sample \Http \Controllers ;
4
+
5
+ use App \Contracts \Controller ;
6
+ use Illuminate \Http \Request ;
7
+
8
+ /**
9
+ * Class SampleController
10
+ */
11
+ class SampleController extends Controller
12
+ {
13
+ /**
14
+ * Display a listing of the resource.
15
+ */
16
+ public function index ()
17
+ {
18
+ return view ('sample::index ' );
19
+ }
20
+
21
+ /**
22
+ * Show the form for creating a new resource.
23
+ */
24
+ public function create ()
25
+ {
26
+ return view ('sample::create ' );
27
+ }
28
+
29
+ /**
30
+ * Store a newly created resource in storage.
31
+ *
32
+ * @param Request $request
33
+ */
34
+ public function store (Request $ request )
35
+ {
36
+ }
37
+
38
+ /**
39
+ * Show the specified resource.
40
+ */
41
+ public function show ()
42
+ {
43
+ return view ('sample::show ' );
44
+ }
45
+
46
+ /**
47
+ * Show the form for editing the specified resource.
48
+ */
49
+ public function edit ()
50
+ {
51
+ return view ('sample::edit ' );
52
+ }
53
+
54
+ /**
55
+ * Update the specified resource in storage.
56
+ */
57
+ public function update (Request $ request )
58
+ {
59
+ }
60
+
61
+ /**
62
+ * Remove the specified resource from storage.
63
+ */
64
+ public function destroy ()
65
+ {
66
+ }
67
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ // This is the admin path. Comment this out if you don't have
4
+ // an admin panel component.
5
+ Route::group ([], function () {
6
+ Route::get ('/ ' , 'AdminController@index ' );
7
+ Route::get ('/create ' , 'AdminController@create ' );
8
+ });
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /**
4
+ * This is publicly accessible
5
+ */
6
+ Route::group (['middleware ' => []], function () {
7
+ Route::get ('/ ' , 'SampleController@index ' );
8
+ });
9
+
10
+ /*
11
+ * This is required to have a valid API key
12
+ */
13
+ Route::group (['middleware ' => [
14
+ 'api.auth ' ,
15
+ ]], function () {
16
+ Route::get ('/hello ' , 'SampleController@hello ' );
17
+ });
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ Route::group (['middleware ' => [
4
+ 'role:user ' , // leave blank to make this public
5
+ ]], function () {
6
+ // all your routes are prefixed with the above prefix
7
+ // e.g. yoursite.com/sample
8
+ Route::get ('/ ' , 'SampleController@index ' );
9
+ });
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Modules \Sample \Listeners ;
4
+
5
+ use App \Events \TestEvent ;
6
+ use Log ;
7
+
8
+ class TestEventListener
9
+ {
10
+ /**
11
+ * Handle the event.
12
+ */
13
+ public function handle (TestEvent $ event )
14
+ {
15
+ Log::info ('Received event ' , [$ event ]);
16
+ }
17
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Modules \Sample \Models ;
4
+
5
+ use App \Contracts \Model ;
6
+
7
+ /**
8
+ * Class SampleTable
9
+ */
10
+ class SampleTable extends Model
11
+ {
12
+ public $ table = '' ;
13
+
14
+ protected $ fillable = [];
15
+ }
You can’t perform that action at this time.
0 commit comments