-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
almost done. all pages done. Finishing with the Course Registration
- Loading branch information
1 parent
cec5606
commit 9b88a66
Showing
38 changed files
with
14,306 additions
and
7,398 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 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 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,58 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use App\User; | ||
use Illuminate\Http\Request; | ||
|
||
class AdminController extends Controller | ||
{ | ||
// | ||
|
||
public function index() | ||
{ | ||
return view('admin.index'); | ||
} | ||
|
||
public function edit() | ||
{ | ||
return view ('admin.edit'); | ||
} | ||
|
||
public function postEdit(Request $request, User $user) | ||
{ | ||
try | ||
{ | ||
$result = $user->updateUser($request->all()); | ||
return apiSuccess($result); | ||
} | ||
catch (\Exception $e) | ||
{ | ||
return apiFailure($e); | ||
} | ||
} | ||
|
||
public function add() | ||
{ | ||
return view('admin.add'); | ||
} | ||
|
||
public function postAdd(Request $request, User $user) | ||
{ | ||
try | ||
{ | ||
$result = $user->createNew($request->all()); | ||
if ($result){ | ||
return apiSuccess($result); | ||
} | ||
else{ | ||
return apiFailure(''); | ||
} | ||
} | ||
catch (\Exception $e) | ||
{ | ||
return apiFailure($e); | ||
} | ||
} | ||
|
||
} |
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 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 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 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
Binary file not shown.
Oops, something went wrong.