This file contains hidden or 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; | |
| use App\Article; | |
| use App\Comment; | |
| use Illuminate\Support\Facades\Validator; | |
| use Illuminate\Http\Request; | |
| class ArticleController extends Controller |
This file contains hidden or 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; | |
| use App\Article; | |
| use App\Comment; | |
| use Illuminate\Support\Facades\Validator; | |
| use Illuminate\Http\Request; | |
| class CommentController extends Controller |
This file contains hidden or 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; | |
| Route::post('article','ArticleController@store'); | |
| Route::get('article/{article}','ArticleController@show'); | |
| Route::get('article/{article}/comments','ArticleController@show_comments'); | |
| Route::get('article/{article}/best-comment','ArticleController@show_best_comment'); | |
| Route::get('articles','ArticleController@index'); |
This file contains hidden or 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\Traits; | |
| use Illuminate\Support\Collection; | |
| use Illuminate\Support\Facades\Cache; | |
| use Illuminate\Database\Eloquent\Model; | |
| use Illuminate\Support\Facades\Validator; | |
| use Illuminate\Pagination\LengthAwarePaginator; |
This file contains hidden or 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; | |
| use App\Traits\ApiResponser; | |
| use Illuminate\Http\Request; | |
| class ApiController extends Controller | |
| { | |
| use ApiResponser; |
This file contains hidden or 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\User; | |
| use App\User; | |
| use Illuminate\Http\Request; | |
| use App\Http\Controllers\ApiController; | |
| use Illuminate\Support\Facades\Hash; | |
| use Illuminate\Support\Facades\Validator; |
This file contains hidden or 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 hidden or 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\User; | |
| use App\User; | |
| use Illuminate\Http\Request; | |
| use Illuminate\Support\Facades\Hash; | |
| use Illuminate\Support\Facades\Validator; | |
| use App\Http\Controllers\ApiController; |
This file contains hidden or 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\Exceptions; | |
| use App\Traits\ApiResponser; | |
| use Exception; | |
| use Illuminate\Database\Eloquent\ModelNotFoundException; | |
| use Illuminate\Validation\ValidationException; | |
| use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; | |
| use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
This file contains hidden or 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\Support\Facades\Schema; | |
| use Illuminate\Database\Schema\Blueprint; | |
| use Illuminate\Database\Migrations\Migration; | |
| class CreateEventsTable extends Migration | |
| { | |
| /** | |
| * Run the migrations. |