コード例 #1
0
ファイル: Frequent.php プロジェクト: edyonil/lumemPaPComJesus
 protected function deleteFrequent(User $user, $idChurch)
 {
     $user->igreja_frequenta = null;
     $user->save();
     $church = new ChurchRepositorio();
     $churchRegister = $church->find($idChurch);
     $listFrequent = $churchRegister->frequentadores;
     if (is_array($listFrequent)) {
         $listFrequent = $this->removerUserFrequent($listFrequent, $idChurch);
         $churchRegister->frequentadores = $listFrequent;
         $churchRegister->save();
     }
 }
コード例 #2
0
ファイル: routes.php プロジェクト: edyonil/lumemPaPComJesus

    $dados = $geolocation->whereRaw($arrayData)->get();

    //dd($dados);

    foreach($dados as $d) {
        var_dump($d);
    }


    //{ location: { $nearSphere: { $geometry: { type: "Point", coordinates: [ -73.93414657, 40.82302903 ] }, $maxDistance: 5 * METERS_PER_MILE } } }


    $geolocation->name = "Ediaimo Sousa Borges";

    $loc = new stdClass();
    $loc->type = 'Point';
    $loc->coordinates = [-20.778889, 20.639722];

    $geolocation->loc = $loc;

    $geolocation->save();

    dd($geolocation);

});*/
$app->get('config-app', function () {
    \App\Domains\Papcj\Models\Church::where('id', '!=', 1)->delete();
    \App\Domains\Papcj\Models\User::where('id', '!=', 1)->delete();
});