PHP code example of aacassandra / parsequent
1. Go to this page and download the library: Download aacassandra/parsequent library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
aacassandra / parsequent example snippets
'providers' => [
/*
* Package Service Providers
*/
// ...
Parsequent\ParseProvider::class,
];
php artisan vendor:publish --provider="Parsequent\ParseProvider"
namespace App\Http\Controllers;
use Parsequent\Parse;
class DevController extends Controller
{
public function dev(Request $request)
{
$create = Parse::Create('GameScore', [
'score' => 1337,
'playerName' => 'Sean Plott',
'cheatMode' => false
]);
if($create->status){
// handling success
}else{
// handling error
}
}
}
namespace App\Http\Controllers;
use Parsequent\Parse;
class DevController extends Controller
{
public function dev(Request $request)
{
$read = Parse::Read('GameScore', [
'objectId' => 'Ed1nuqPvcm'
]);
if($read->status){
// handling success
}else{
// handling error
}
}
}
namespace App\Http\Controllers;
use Parsequent\Parse;
class DevController extends Controller
{
public function dev(Request $request)
{
$update = Parse::Update('GameScore', [
'score' => 73453
], [
'objectId' => 'Ed1nuqPvcm'
]);
if($update->status){
// handling success
}else{
// handling error
}
}
}
namespace App\Http\Controllers;
use Parsequent\Parse;
class DevController extends Controller
{
public function dev(Request $request)
{
$update = Parse::Update('GameScore', [
'score' => 73453
], [
'where' => [
['cheatMode', 'equalTo', false]
]
]);
if($update->status){
// handling success
}else{
// handling error
}
}
}
namespace App\Http\Controllers;
use Parsequent\Parse;
class DevController extends Controller
{
public function dev(Request $request)
{
$delete = Parse::Delete('GameScore', [
'objectId' => 'Ed1nuqPvcm'
]);
if($delete->status){
// handling success
}else{
// handling error
}
}
}