This file contains 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 Database\Seeders; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Support\Facades\Hash; | |
use Illuminate\Database\Seeder; | |
use App\Models\Team; | |
use App\Models\User; | |
use Laravel\Jetstream\Jetstream; | |
class Users extends Seeder | |
{ |
This file contains 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\Providers; | |
use App\Actions\Jetstream\AddTeamMember; | |
use App\Actions\Jetstream\CreateTeam; | |
use App\Actions\Jetstream\DeleteTeam; | |
use App\Actions\Jetstream\DeleteUser; | |
use App\Actions\Jetstream\InviteTeamMember; | |
use App\Actions\Jetstream\RemoveTeamMember; |
This file contains 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\Policies; | |
use App\Models\Team; | |
use App\Models\User; | |
use Illuminate\Auth\Access\HandlesAuthorization; | |
class TeamPolicy | |
{ |
This file contains 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\Policies; | |
use App\Models\Team; | |
use App\Models\User; | |
use Illuminate\Auth\Access\HandlesAuthorization; | |
class TeamPolicy | |
{ |
This file contains 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\Elastic; | |
use Illuminate\Support\Str; | |
/** @package App\Elastic */ | |
trait Findable | |
{ | |
public static function finder() |
This file contains 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\Elastic\Builders; | |
use App\Elastic\ElasticEngine; | |
use App\Models\Tag; | |
class ProductBuilder extends ElasticEngine | |
{ | |
/** |
This file contains 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\Elastic; | |
use Elasticsearch\Client; | |
use Elasticsearch\ClientBuilder; | |
use Elasticsearch\Common\Exceptions\RuntimeException as ExceptionsRuntimeException; | |
use Exception; | |
use Illuminate\Pagination\Paginator; | |
use Illuminate\Support\Collection; |
This file contains 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\Elastic\Builders; | |
use App\Elastic\ElasticEngine; | |
// This is the generic builder class that extends the ElasticEngine | |
class Builder extends ElasticEngine | |
{ | |
public function __construct($model) |
This file contains 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\Elastic; | |
use Illuminate\Support\Collection; | |
use Illuminate\Container\Container; | |
use Illuminate\Contracts\Container\BindingResolutionException; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
use Illuminate\Pagination\Paginator; | |
use Illuminate\Support\Str; |
This file contains 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
import time | |
import pandas as pd | |
from es_pandas import es_pandas | |
import numpy as np | |
def gather(sql): | |
print("Getting...") | |
data_url = 'mysql+mysqldb://sail:password@127.0.0.1:3306/sales' | |
print(sql) | |
df = pd.read_sql_query(sql=sql,con=data_url) |
OlderNewer