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
| { | |
| "data": [ | |
| { | |
| "id": 1, | |
| "title": "This is title", | |
| "content": "This is a sample content.", | |
| "created_at": "2020-12-27T06:28:34.000000Z", | |
| "updated_at": "2020-12-27T06:28:34.000000Z" | |
| }, | |
| { |
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 App\Http\Controllers\Api\ArticlesController; | |
| use Illuminate\Support\Facades\Route; | |
| use Orion\Facades\Orion; | |
| Route::group(['as' => 'api.'], function() { | |
| Orion::resource('articles', ArticlesController::class); | |
| }); |
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\Models; | |
| use Illuminate\Database\Eloquent\Factories\HasFactory; | |
| use Illuminate\Database\Eloquent\Model; | |
| class Article extends Model | |
| { | |
| use HasFactory; |
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\Api; | |
| use App\Models\Article; | |
| use Orion\Concerns\DisableAuthorization; | |
| use Orion\Http\Controllers\Controller; | |
| class ArticlesController 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\Database\Migrations\Migration; | |
| use Illuminate\Database\Schema\Blueprint; | |
| use Illuminate\Support\Facades\Schema; | |
| class CreateArticlesTable extends Migration | |
| { | |
| /** | |
| * Run the migrations. |
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
| huawei_appgallery_connect( | |
| client_id: "<CLIENT_ID>", | |
| client_secret: "<CLIENT_SECRET>", | |
| app_id: "<APP_ID>", #app id | |
| apk_path: "<APK_PATH>" #path to the apk/aab file | |
| # Optional, Parameter beyond this are optional | |
| # if you're uploading aab instead of apk, specify is_aab to true and specify path to aab file on apk_path | |
| is_aab: true |
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
| huawei_appgallery_connect_submit_for_review( | |
| client_id: "<CLIENT_ID>", | |
| client_secret: "<CLIENT_SECRET>", | |
| app_id: "<APP_ID>", | |
| # Optional, Parameter beyond this are optional | |
| # release time to release app on specific date | |
| release_time: "2019-12-25T07:05:15+0000", |