-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from Crudzaso/develop
Develop
- Loading branch information
Showing
50 changed files
with
271 additions
and
281 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
66 changes: 66 additions & 0 deletions
66
Modules/Lottery/app/Http/Controllers/LotteryController.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?php | ||
|
||
namespace Modules\Lottery\Http\Controllers; | ||
|
||
use App\Http\Controllers\Controller; | ||
use Illuminate\Http\Request; | ||
use Modules\Lottery\Models\Lottery; | ||
|
||
class LotteryController extends Controller | ||
{ | ||
/** | ||
* Display a listing of the resource. | ||
*/ | ||
public function index() | ||
{ | ||
return response()->json(Lottery::all()); | ||
} | ||
|
||
/** | ||
* Show the form for creating a new resource. | ||
*/ | ||
public function create() | ||
{ | ||
return view('lottery::create'); | ||
} | ||
|
||
/** | ||
* Store a newly created resource in storage. | ||
*/ | ||
public function store(Request $request) | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Show the specified resource. | ||
*/ | ||
public function show($id) | ||
{ | ||
return view('lottery::show'); | ||
} | ||
|
||
/** | ||
* Show the form for editing the specified resource. | ||
*/ | ||
public function edit($id) | ||
{ | ||
return view('lottery::edit'); | ||
} | ||
|
||
/** | ||
* Update the specified resource in storage. | ||
*/ | ||
public function update(Request $request, $id) | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Remove the specified resource from storage. | ||
*/ | ||
public function destroy($id) | ||
{ | ||
// | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace Modules\Lottery\Models; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
// use Modules\Lottery\Database\Factories\LotteryFactory; | ||
use Modules\Raffle\Models\Raffle; | ||
use Modules\Draws\Models\Draws; | ||
|
||
class Lottery extends Model | ||
{ | ||
use HasFactory; | ||
|
||
public function raffles() | ||
{ | ||
return $this->hasMany(Raffle::class, 'lottery_id'); | ||
} | ||
|
||
public function draws() | ||
{ | ||
return $this->hasMany(Draws::class, 'lottery_id'); | ||
} | ||
|
||
/** | ||
* The attributes that are mass assignable. | ||
*/ | ||
protected $fillable = [ | ||
'name', | ||
'description', | ||
'url_imagen' | ||
]; | ||
|
||
protected static function newFactory() | ||
{ | ||
return \Modules\Lottery\Database\Factories\LotteryFactory::new(); | ||
} | ||
} | ||
|
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ry/app/Providers/EventServiceProvider.php → ...ry/app/Providers/EventServiceProvider.php
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
8 changes: 4 additions & 4 deletions
8
...y/app/Providers/LoteryServiceProvider.php → .../app/Providers/LotteryServiceProvider.php
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
Oops, something went wrong.