Skip to content

Instantly share code, notes, and snippets.

{
"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"
},
{
@shr3jn
shr3jn / api.php
Last active December 27, 2020 06:29
<?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);
});
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Article extends Model
{
use HasFactory;
<?php
namespace App\Http\Controllers\Api;
use App\Models\Article;
use Orion\Concerns\DisableAuthorization;
use Orion\Http\Controllers\Controller;
class ArticlesController extends Controller
{
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateArticlesTable extends Migration
{
/**
* Run the migrations.
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
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",