repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/117.repositorydescription.php | resources/sql/patches/117.repositorydescription.php | <?php
$conn = id(new PhabricatorRepository())->establishConnection('w');
if (queryfx_one($conn, "SHOW COLUMNS FROM `repository` LIKE 'description'")) {
queryfx($conn, 'ALTER TABLE `repository` DROP `description`');
}
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20121209.xmacromigrate.php | resources/sql/patches/20121209.xmacromigrate.php | <?php
echo pht('Giving image macros PHIDs');
$table = new PhabricatorFileImageMacro();
$table->openTransaction();
foreach (new LiskMigrationIterator($table) as $macro) {
if ($macro->getPHID()) {
continue;
}
echo '.';
queryfx(
$macro->establishConnection('w'),
'UPDATE %T SET phid = %s WHERE id = ... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/migrate-maniphest-dependencies.php | resources/sql/patches/migrate-maniphest-dependencies.php | <?php
// From 2013-2016, this migration moved dependent tasks to edges.
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20130403.conpherencecachemig.php | resources/sql/patches/20130403.conpherencecachemig.php | <?php
echo pht(
"Migrating data from conpherence transactions to conpherence 'cache'...\n");
$table = new ConpherenceThread();
$table->openTransaction();
$conn_w = $table->establishConnection('w');
$participant_table = new ConpherenceParticipant();
$conpherences = new LiskMigrationIterator($table);
foreach ($conp... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20131020.pxactionmig.php | resources/sql/patches/20131020.pxactionmig.php | <?php
$project_table = new PhabricatorProject();
$conn_w = $project_table->establishConnection('w');
$conn_w->openTransaction();
$src_table = 'project_legacytransaction';
$dst_table = 'project_transaction';
echo pht('Migrating Project transactions to new format...')."\n";
$content_source = PhabricatorContentSource:... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20130619.authconf.php | resources/sql/patches/20130619.authconf.php | <?php
$config_map = array(
'PhabricatorLDAPAuthProvider' => array(
'enabled' => 'ldap.auth-enabled',
'registration' => true,
'type' => 'ldap',
'domain' => 'self',
),
'PhabricatorAuthProviderOAuthDisqus' => array(
'enabled' => 'disqus.auth-enabled',
'registration' => 'disqus.r... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/090.forceuniqueprojectnames.php | resources/sql/patches/090.forceuniqueprojectnames.php | <?php
echo pht('Ensuring project names are unique enough...')."\n";
$table = new PhabricatorProject();
$table->openTransaction();
$table->beginReadLocking();
$projects = $table->loadAll();
$slug_map = array();
foreach ($projects as $project) {
$slug = PhabricatorSlug::normalizeProjectSlug($project->getName());
... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/098.heraldruletypemigration.php | resources/sql/patches/098.heraldruletypemigration.php | <?php
echo pht("Checking for rules that can be converted to 'personal'.")."\n";
$table = new HeraldRule();
$table->openTransaction();
$table->beginReadLocking();
$rules = $table->loadAll();
foreach ($rules as $rule) {
if ($rule->getRuleType() !== HeraldRuleTypeConfig::RULE_TYPE_PERSONAL) {
$actions = $rule->lo... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20131205.buildstepordermig.php | resources/sql/patches/20131205.buildstepordermig.php | <?php
$table = new HarbormasterBuildPlan();
$conn_w = $table->establishConnection('w');
$viewer = PhabricatorUser::getOmnipotentUser();
// Since HarbormasterBuildStepQuery has been updated to handle the
// correct order, we can't use the built in database access.
foreach (new LiskMigrationIterator($table) as $plan) ... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/079.nametokenindex.php | resources/sql/patches/079.nametokenindex.php | <?php
echo pht('Indexing username tokens for typeaheads...')."\n";
$table = new PhabricatorUser();
$table->openTransaction();
$table->beginReadLocking();
$users = $table->loadAll();
echo pht('%d users to index', count($users));
foreach ($users as $user) {
$user->updateNameTokens();
echo '.';
}
$table->endReadLo... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20130611.migrateoauth.php | resources/sql/patches/20130611.migrateoauth.php | <?php
$table = new PhabricatorUser();
$conn = $table->establishConnection('w');
$table_name = 'user_oauthinfo';
foreach (new LiskRawMigrationIterator($conn, $table_name) as $row) {
throw new Exception(
pht(
'This database has ancient OAuth account data and is too old to '.
'upgrade directly to a mod... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20130715.votecomments.php | resources/sql/patches/20130715.votecomments.php | <?php
echo pht('Moving Slowvote comments to transactions...')."\n";
$viewer = PhabricatorUser::getOmnipotentUser();
$table_xaction = new PhabricatorSlowvoteTransaction();
$table_comment = new PhabricatorSlowvoteTransactionComment();
$conn_w = $table_xaction->establishConnection('w');
$comments = new LiskRawMigratio... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/111.commitauditmigration.php | resources/sql/patches/111.commitauditmigration.php | <?php
echo pht('Updating old commit authors...')."\n";
$table = new PhabricatorRepositoryCommit();
$table->openTransaction();
$conn = $table->establishConnection('w');
$data = new PhabricatorRepositoryCommitData();
$commits = queryfx_all(
$conn,
'SELECT c.id id, c.authorPHID authorPHID, d.commitDetails details
... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20130912.maniphest.4.fillindex.php | resources/sql/patches/20130912.maniphest.4.fillindex.php | <?php
// This previously updated the PROJ index, but HEAD can no longer reindex
// old PROJ records properly (since fields have been added to various places)
// and this migration is 6 months old and optional. Just skip it.
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/081.filekeys.php | resources/sql/patches/081.filekeys.php | <?php
echo pht('Generating file keys...')."\n";
$table = new PhabricatorFile();
$table->openTransaction();
$table->beginReadLocking();
$files = $table->loadAllWhere('secretKey IS NULL');
echo pht('%d files to generate keys for', count($files));
foreach ($files as $file) {
queryfx(
$file->establishConnection('w'... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/131.migraterevisionquery.php | resources/sql/patches/131.migraterevisionquery.php | <?php
// This migration has been dropped, see T7604 for details.
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/093.gitremotes.php | resources/sql/patches/093.gitremotes.php | <?php
echo pht('Stripping remotes from repository default branches...')."\n";
$table = new PhabricatorRepository();
$table->openTransaction();
$conn_w = $table->establishConnection('w');
$repos = queryfx_all(
$conn_w,
'SELECT id, name, details FROM %T WHERE versionControlSystem = %s FOR UPDATE',
$table->getTab... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20130921.xmigratemaniphest.php | resources/sql/patches/20130921.xmigratemaniphest.php | <?php
$task_table = new ManiphestTask();
$conn_w = $task_table->establishConnection('w');
$rows = new LiskRawMigrationIterator($conn_w, 'maniphest_transaction');
$conn_w->openTransaction();
// NOTE: These were the correct table names at the time of this patch.
$xaction_table_name = 'maniphest_transactionpro';
$comme... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20130611.nukeldap.php | resources/sql/patches/20130611.nukeldap.php | <?php
$table = new PhabricatorUser();
$conn = $table->establishConnection('w');
$table_name = 'user_ldapinfo';
foreach (new LiskRawMigrationIterator($conn, $table_name) as $row) {
throw new Exception(
pht(
'This database has ancient LDAP account data and is too old to upgrade '.
'directly to a moder... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20131217.pushlogphid.2.mig.php | resources/sql/patches/20131217.pushlogphid.2.mig.php | <?php
$table = new PhabricatorRepositoryPushLog();
$conn_w = $table->establishConnection('w');
echo pht('Assigning PHIDs to push logs...')."\n";
$logs = new LiskMigrationIterator($table);
foreach ($logs as $log) {
$id = $log->getID();
echo pht('Updating %s...', $id)."\n";
queryfx(
$conn_w,
'UPDATE %T S... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20130219.commitsummarymig.php | resources/sql/patches/20130219.commitsummarymig.php | <?php
echo pht('Backfilling commit summaries...')."\n";
$table = new PhabricatorRepositoryCommit();
$conn_w = $table->establishConnection('w');
$commits = new LiskMigrationIterator($table);
foreach ($commits as $commit) {
echo pht('Filling Commit #%d', $commit->getID())."\n";
if (strlen($commit->getSummary())) {... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/102.heraldcleanup.php | resources/sql/patches/102.heraldcleanup.php | <?php
// Once, this migration deleted some unnecessary rows written by Herald before
// January 2012. These rows don't hurt anything, they just cluttered up the
// database a bit.
// The migration was removed in January 2018 to make maintenance on rule
// repetition policies easier.
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20130529.macroauthormig.php | resources/sql/patches/20130529.macroauthormig.php | <?php
echo pht('Migrating macro authors...')."\n";
foreach (new LiskMigrationIterator(new PhabricatorFileImageMacro()) as $macro) {
echo pht('Macro #%d', $macro->getID())."\n";
if ($macro->getAuthorPHID()) {
// Already have an author; skip it.
continue;
}
if (!$macro->getFilePHID()) {
// No valid... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20130201.revisionunsubscribed.php | resources/sql/patches/20130201.revisionunsubscribed.php | <?php
echo pht('Migrating Differential unsubscribed users to edges...')."\n";
$table = new DifferentialRevision();
$table->openTransaction();
// We couldn't use new LiskMigrationIterator($table) because the $unsubscribed
// property gets deleted.
$revs = queryfx_all(
$table->establishConnection('w'),
'SELECT id, ... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/migrate-differential-dependencies.php | resources/sql/patches/migrate-differential-dependencies.php | <?php
echo pht('Migrating differential dependencies to edges...')."\n";
$table = new DifferentialRevision();
$table->openTransaction();
foreach (new LiskMigrationIterator($table) as $rev) {
$id = $rev->getID();
echo pht('Revision %d: ', $id);
$deps = $rev->getAttachedPHIDs(DifferentialRevisionPHIDType::TYPECON... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20130919.mfieldconf.php | resources/sql/patches/20130919.mfieldconf.php | <?php
echo pht('Migrating Maniphest custom field configuration...')."\n";
$old_key = 'maniphest.custom-fields';
$new_key = 'maniphest.custom-field-definitions';
if (PhabricatorEnv::getEnvConfig($new_key)) {
echo pht('Skipping migration, new data is already set.')."\n";
return;
}
$old = PhabricatorEnv::getEnvCon... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20130926.dinline.php | resources/sql/patches/20130926.dinline.php | <?php
$revision_table = new DifferentialRevision();
$conn_w = $revision_table->establishConnection('w');
$conn_w->openTransaction();
$src_table = 'differential_inlinecomment';
$dst_table = 'differential_transaction_comment';
echo pht('Migrating Differential inline comments to new format...')."\n";
$content_source =... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/ponder-mailkey-populate.php | resources/sql/patches/ponder-mailkey-populate.php | <?php
echo pht('Populating Questions with mail keys...')."\n";
$table = new PonderQuestion();
$table->openTransaction();
foreach (new LiskMigrationIterator($table) as $question) {
$id = $question->getID();
echo pht('Question %d: ', $id);
if (!$question->getMailKey()) {
queryfx(
$question->establishCo... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20130711.trimrealnames.php | resources/sql/patches/20130711.trimrealnames.php | <?php
$table = new PhabricatorUser();
$conn_w = $table->establishConnection('w');
echo pht('Trimming trailing whitespace from user real names...')."\n";
foreach (new LiskMigrationIterator($table) as $user) {
$id = $user->getID();
$real = $user->getRealName();
$trim = rtrim($real);
if ($trim == $real) {
e... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/20131121.repocredentials.2.mig.php | resources/sql/patches/20131121.repocredentials.2.mig.php | <?php
// This migration originally imported repository credentials from the old
// inline format into Passphrase after the application was introduced. After
// about 18 months, following the introduction of Spaces, it stopped running
// cleanly. Installs older than Nov 2013 will need to manually fix repository
// cred... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/patches/migrate-maniphest-revisions.php | resources/sql/patches/migrate-maniphest-revisions.php | <?php
// From 2013-2016, this migration moved revisions attached to tasks to edges.
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/server.php | backend/server.php | <?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com>
*/
$uri = urldecode(
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
);
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
// built-in PHP web server. Thi... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Tag.php | backend/app/Tag.php | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Tag extends Model
{
public $timestamps = false;
protected $fillable = ['name', 'slug'];
public function posts()
{
return $this->belongsToMany('App\Post');
}
public function getRouteKeyName()
{
return 'slu... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/User.php | backend/app/User.php | <?php
namespace App;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable implements JWTSubject
{
use Notifiable;
//================= attributes =================
public $timestamps = f... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Category.php | backend/app/Category.php | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Category extends Model
{
public $timestamps = false;
protected $fillable = ['title', 'slug', 'description', 'moderator'];
public function posts()
{
return $this->hasMany('App\Post');
}
public function moderator()
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Comment.php | backend/app/Comment.php | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Comment extends Model
{
protected $fillable = [
'body', 'user_id', 'post_id'
];
public function user()
{
return $this->belongsTo('App\User');
}
public function post()
{
return $this->belongsTo('Ap... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Message.php | backend/app/Message.php | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Message extends Model
{
protected $fillable = ['message'];
public function user()
{
return $this->belongsTo(User::class);
}
}
| php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Post.php | backend/app/Post.php | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
public $timestamps = false;
protected $fillable = [
'title', 'body', 'slug', 'category_id', 'author_id', 'caption'
];
//================ relationship ================
public function category()
{
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Exceptions/Handler.php | backend/app/Exceptions/Handler.php | <?php
namespace App\Exceptions;
use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*
* @var array
*/
protected $dontReport = [
//
];
/**
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Helpers/UploadingFiles.php | backend/app/Helpers/UploadingFiles.php | <?php
namespace App\Helpers;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\Storage;
class UploadingFiles
{
/**
* update the avatar file of the user.
*
* @param UploadedFile $avatarFile
* @param string $prevAvatarName
* @return string the file name that wi... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Kernel.php | backend/app/Http/Kernel.php | <?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array
*/
protected $middleware =... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Requests/CommentRequest.php | backend/app/Http/Requests/CommentRequest.php | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use App\Repositories\Comment\RepositoryInterface as CommentRepo;
use App\Repositories\User\AuthRepositoryInterface as AuthUserRepo;
class CommentRequest extends FormRequest
{
private $commentRepo;
private $authUserRepo;
publi... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Requests/UpdateUserRequest.php | backend/app/Http/Requests/UpdateUserRequest.php | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use App\Repositories\User\AuthRepositoryInterface as AuthUserRepo;
class UpdateUserRequest extends FormRequest
{
private $authUserRepo;
public function __construct(AuthUserRepo $authUserRepo)
{
$this->authUserRepo = $... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Requests/PostsFilterReuqest.php | backend/app/Http/Requests/PostsFilterReuqest.php | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class PostsFilterReuqest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Ge... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Requests/Admin/PostRequest.php | backend/app/Http/Requests/Admin/PostRequest.php | <?php
namespace App\Http\Requests\Admin;
use Illuminate\Foundation\Http\FormRequest;
use App\Repositories\Post\RepositoryInterface as PostRepo;
use App\Repositories\User\AuthRepositoryInterface as AuthUserRepo;
class PostRequest extends FormRequest
{
private $postRepo;
private $authUserRepo;
public func... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Requests/Admin/CategoryRequest.php | backend/app/Http/Requests/Admin/CategoryRequest.php | <?php
namespace App\Http\Requests\Admin;
use Illuminate\Foundation\Http\FormRequest;
use App\Repositories\User\AuthRepositoryInterface as AuthUserRepo;
use App\Repositories\Category\RepositoryInterface as CategoryRepo;
class CategoryRequest extends FormRequest
{
private $authUserRepo;
private $categoryRepo;
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Requests/Admin/TagRequest.php | backend/app/Http/Requests/Admin/TagRequest.php | <?php
namespace App\Http\Requests\Admin;
use Illuminate\Foundation\Http\FormRequest;
use App\Repositories\Tag\RepositoryInterface as TagRepo;
use App\Repositories\User\AuthRepositoryInterface as AuthUserRepo;
class TagRequest extends FormRequest
{
private $tagRepo;
private $authUserRepo;
public functio... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/PostController.php | backend/app/Http/Controllers/PostController.php | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Resources\PostResource;
use App\Http\Resources\CommentResource;
use App\Http\Requests\PostsFilterReuqest;
use App\Http\Resources\PaginatedCollection;
use App\Repositories\Comment\RepositoryInterface as CommentRepo;
use App\Repositories\Po... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/Controller.php | backend/app/Http/Controllers/Controller.php | <?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
class Controller extends BaseController
{
use AuthorizesReques... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/CommentController.php | backend/app/Http/Controllers/CommentController.php | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests\CommentRequest;
use App\Http\Resources\CommentResource;
use App\Repositories\Comment\RepositoryInterface as CommentRepo;
use App\Repositories\User\AuthRepositoryInterface as AuthUserRepo;
class CommentController extends Controll... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/UserController.php | backend/app/Http/Controllers/UserController.php | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Helpers\UploadingFiles;
use App\Http\Resources\UserResource;
use Illuminate\Support\Facades\Storage;
use App\Http\Requests\UpdateUserRequest;
use App\Http\Resources\UserSearchResource;
use App\Repositories\User\RepositoryInterface as UserRepo;... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/AuthController.php | backend/app/Http/Controllers/AuthController.php | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Resources\UserResource;
use App\Repositories\User\RepositoryInterface as UserRepo;
class AuthController extends Controller
{
public function __construct()
{
$this->middleware('auth:api... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/HomeController.php | backend/app/Http/Controllers/HomeController.php | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Resources\TagResource;
use App\Http\Resources\UserResource;
use App\Http\Resources\CategoryResource;
use App\Http\Resources\CategorySearchResource;
use App\Repositories\Tag\RepositoryInterface as TagRepo;
use App\Repositories\User\Reposit... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/Admin/CategoryController.php | backend/app/Http/Controllers/Admin/CategoryController.php | <?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Resources\CategoryResource;
use App\Http\Requests\Admin\CategoryRequest;
use App\Http\Resources\PaginatedCollection;
use App\Repositories\Post\RepositoryInterface as PostRepo;
use App\Repositorie... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/Admin/PostController.php | backend/app/Http/Controllers/Admin/PostController.php | <?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Helpers\UploadingFiles;
use App\Http\Controllers\Controller;
use App\Http\Resources\PostResource;
use App\Http\Resources\CommentResource;
use App\Http\Requests\Admin\PostRequest;
use App\Http\Resources\PaginatedCollection;
use App\Reposi... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/Admin/CommentController.php | backend/app/Http/Controllers/Admin/CommentController.php | <?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Resources\PaginatedCollection;
use App\Repositories\Comment\RepositoryInterface as CommentRepo;
use App\Repositories\User\AuthRepositoryInterface as AuthUserRepo;
class CommentController extends... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/Admin/UserController.php | backend/app/Http/Controllers/Admin/UserController.php | <?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Resources\UserResource;
use App\Http\Resources\UserSearchResource;
use App\Http\Resources\PaginatedCollection;
use App\Repositories\Post\RepositoryInterface as PostRepo;
use App\Repositories\User... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/Admin/TagController.php | backend/app/Http/Controllers/Admin/TagController.php | <?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Resources\TagResource;
use App\Http\Controllers\Controller;
use App\Http\Requests\Admin\TagRequest;
use App\Http\Resources\PaginatedCollection;
use App\Repositories\Tag\RepositoryInterface as TagRepo;
use App\Repositories\Post\Repos... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/Admin/ChatController.php | backend/app/Http/Controllers/Admin/ChatController.php | <?php
namespace App\Http\Controllers\Admin;
use App\Events\MessageSent;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Resources\MessageResource;
use App\Repositories\Chat\RepositoryInterface as ChatRepo;
use App\Repositories\User\AuthRepositoryInterface as AuthUserRepo;
class ChatCon... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/Admin/DashboardController.php | backend/app/Http/Controllers/Admin/DashboardController.php | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Repositories\User\RepositoryInterface as UserRepo;
use App\Repositories\Post\RepositoryInterface as PostRepo;
use App\Repositories\Comment\RepositoryInterface as CommentRepo;
class DashboardController extends Controller
{
pr... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/Auth/LoginController.php | backend/app/Http/Controllers/Auth/LoginController.php | <?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|----------------------------... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/Auth/ForgotPasswordController.php | backend/app/Http/Controllers/Auth/ForgotPasswordController.php | <?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
class ForgotPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|----... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/Auth/ResetPasswordController.php | backend/app/Http/Controllers/Auth/ResetPasswordController.php | <?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
class ResetPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Controllers/Auth/RegisterController.php | backend/app/Http/Controllers/Auth/RegisterController.php | <?php
namespace App\Http\Controllers\Auth;
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;
class RegisterController extends Controller
{
/*
|---------------------------------------... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Middleware/RedirectIfAuthenticated.php | backend/app/Http/Middleware/RedirectIfAuthenticated.php | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class RedirectIfAuthenticated
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @return mixed
*/
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Middleware/JsonMiddleware.php | backend/app/Http/Middleware/JsonMiddleware.php | <?php
namespace App\Http\Middleware;
use Closure;
class JsonMiddleware
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$request->headers-... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Middleware/TrustProxies.php | backend/app/Http/Middleware/TrustProxies.php | <?php
namespace App\Http\Middleware;
use Illuminate\Http\Request;
use Fideloper\Proxy\TrustProxies as Middleware;
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array
*/
protected $proxies;
/**
* The headers that should be used t... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Middleware/TrimStrings.php | backend/app/Http/Middleware/TrimStrings.php | <?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
class TrimStrings extends Middleware
{
/**
* The names of the attributes that should not be trimmed.
*
* @var array
*/
protected $except = [
'password',
'password_conf... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Middleware/CheckForMaintenanceMode.php | backend/app/Http/Middleware/CheckForMaintenanceMode.php | <?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware;
class CheckForMaintenanceMode extends Middleware
{
/**
* The URIs that should be reachable while maintenance mode is enabled.
*
* @var array
*/
protected $except = [
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Middleware/EncryptCookies.php | backend/app/Http/Middleware/EncryptCookies.php | <?php
namespace App\Http\Middleware;
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
class EncryptCookies extends Middleware
{
/**
* The names of the cookies that should not be encrypted.
*
* @var array
*/
protected $except = [
//
];
}
| php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Middleware/RefreshToken.php | backend/app/Http/Middleware/RefreshToken.php | <?php
namespace App\Http\Middleware;
use Carbon\Carbon;
use Illuminate\Support\Facades\Cache;
use Tymon\JWTAuth\Exceptions\JWTException;
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
use Tymon\JWTAuth\Http\Middleware\BaseMiddleware;
use Tymon\JWTAuth\Exceptions\TokenExpiredException;
class Re... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Middleware/VerifyCsrfToken.php | backend/app/Http/Middleware/VerifyCsrfToken.php | <?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
//
];
}
| php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Resources/PostResource.php | backend/app/Http/Resources/PostResource.php | <?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class PostResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Resources/PaginatedCollection.php | backend/app/Http/Resources/PaginatedCollection.php | <?php
namespace App\Http\Resources;
use App\Repositories\BaseRepository;
use Illuminate\Http\Resources\Json\ResourceCollection;
class PaginatedCollection extends ResourceCollection
{
private $total;
private $perPage;
public $collects;
public function __construct($resource, string $collects, int $tot... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Resources/UserResource.php | backend/app/Http/Resources/UserResource.php | <?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class UserResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Resources/MessageResource.php | backend/app/Http/Resources/MessageResource.php | <?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class MessageResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Resources/UserSearchResource.php | backend/app/Http/Resources/UserSearchResource.php | <?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class UserSearchResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Resources/CategorySearchResource.php | backend/app/Http/Resources/CategorySearchResource.php | <?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class CategorySearchResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Resources/CommentResource.php | backend/app/Http/Resources/CommentResource.php | <?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class CommentResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Resources/TagResource.php | backend/app/Http/Resources/TagResource.php | <?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class TagResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Resources/PostRowResource.php | backend/app/Http/Resources/PostRowResource.php | <?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class PostRowResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Http/Resources/CategoryResource.php | backend/app/Http/Resources/CategoryResource.php | <?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class CategoryResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Console/Kernel.php | backend/app/Console/Kernel.php | <?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
//
];
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Repositories/BaseRepository.php | backend/app/Repositories/BaseRepository.php | <?php
namespace App\Repositories;
class BaseRepository
{
/**
* the current record we are working in
*
* @var \App\$this->_model
*/
protected $_record;
/**
* The total number of records before slicing.
*
* @var int
*/
protected $_total;
/**
* the model... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Repositories/Post/Repository.php | backend/app/Repositories/Post/Repository.php | <?php
namespace App\Repositories\Post;
use App\Post;
use App\Repositories\BaseRepository;
use App\Repositories\User\AuthRepositoryInterface as AuthUserRepo;
class Repository extends BaseRepository implements RepositoryInterface
{
protected $_model = '\\App\\Post';
/**
* get pageinated posts sorted acco... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Repositories/Post/RepositoryInterface.php | backend/app/Repositories/Post/RepositoryInterface.php | <?php
namespace App\Repositories\Post;
interface RepositoryInterface
{
/**
* get pageinated posts sorted according to the given rules array
* this method return only the published posts
* the array will be something like:
* ['views' => 'DESC', 'title' => 'vue']
*
* @param array $rul... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Repositories/Category/Repository.php | backend/app/Repositories/Category/Repository.php | <?php
namespace App\Repositories\Category;
use App\Category;
use App\Repositories\BaseRepository;
use App\Repositories\User\RepositoryInterface as UserRepo;
class Repository extends BaseRepository implements RepositoryInterface
{
protected $_model = '\\App\\Category';
/**
* get first $limit categories ... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Repositories/Category/RepositoryInterface.php | backend/app/Repositories/Category/RepositoryInterface.php | <?php
namespace App\Repositories\Category;
interface RepositoryInterface
{
/**
* get first $limit categories have more posts
*
* @param int $limit
* @return Illuminate\Database\Eloquent\Collection
*/
public function getPopularCategories($limit);
/**
* get pageinated categor... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Repositories/Tag/Repository.php | backend/app/Repositories/Tag/Repository.php | <?php
namespace App\Repositories\Tag;
use App\Tag;
use App\Repositories\BaseRepository;
class Repository extends BaseRepository implements RepositoryInterface
{
protected $_model = '\\App\\Tag';
/**
* get first $limit tags have more posts
*
* @param int $limit
* @return Illuminate\Datab... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Repositories/Tag/RepositoryInterface.php | backend/app/Repositories/Tag/RepositoryInterface.php | <?php
namespace App\Repositories\Tag;
interface RepositoryInterface
{
/**
* get first $limit tags have more posts
*
* @param int $limit
* @return Illuminate\Database\Eloquent\Collection
*/
public function getPopularTags($limit);
/**
* get pageinated tags with counting posts... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Repositories/Chat/Repository.php | backend/app/Repositories/Chat/Repository.php | <?php
namespace App\Repositories\Chat;
use App\Message;
use App\Repositories\BaseRepository;
use App\Repositories\User\AuthRepositoryInterface as AuthUserRepo;
class Repository extends BaseRepository implements RepositoryInterface
{
protected $_model = '\\App\\Message';
/**
* get pageinated messages
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Repositories/Chat/RepositoryInterface.php | backend/app/Repositories/Chat/RepositoryInterface.php | <?php
namespace App\Repositories\Chat;
interface RepositoryInterface
{
/**
* get pageinated messages
* if ($id = 20 and limit = 10) the api will return the following messages:
* 19 18 17 16 15 14 13 12 11 10
*
* @param int $limit
* @param int $id the last message id
* @ret... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Repositories/User/AuthRepository.php | backend/app/Repositories/User/AuthRepository.php | <?php
namespace App\Repositories\User;
use App\User;
class AuthRepository extends Repository implements AuthRepositoryInterface
{
public function __construct()
{
$this->_record = auth()->user();
}
/**
* return the current authenticated user
*
* @return \stdClass
*/
pu... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Repositories/User/AuthRepositoryInterface.php | backend/app/Repositories/User/AuthRepositoryInterface.php | <?php
namespace App\Repositories\User;
interface AuthRepositoryInterface
{
/**
* return the current authenticated user
*
* @return \stdClass
*/
public function user();
/**
* update the authenticated user
*
* @param array $data
* @return void
*/
public fu... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Repositories/User/Repository.php | backend/app/Repositories/User/Repository.php | <?php
namespace App\Repositories\User;
use App\User;
use App\Repositories\BaseRepository;
class Repository extends BaseRepository implements RepositoryInterface
{
protected $_model = '\\App\\User';
/**
* get first $limit authors have more posts
*
* @param integer $limit
* @return Illumi... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Repositories/User/RepositoryInterface.php | backend/app/Repositories/User/RepositoryInterface.php | <?php
namespace App\Repositories\User;
interface RepositoryInterface
{
/**
* get first $limit authors have more posts
*
* @param integer $limit
* @return Illuminate\Database\Eloquent\Collection
*/
public function getPopularAuthors($limit);
/**
* get pageinated users with co... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Repositories/Comment/Repository.php | backend/app/Repositories/Comment/Repository.php | <?php
namespace App\Repositories\Comment;
use App\Comment;
use App\Repositories\BaseRepository;
use App\Repositories\User\AuthRepositoryInterface as AuthUserRepo;
class Repository extends BaseRepository implements RepositoryInterface
{
protected $_model = '\\App\\Comment';
/**
* get pageinated comments... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Repositories/Comment/RepositoryInterface.php | backend/app/Repositories/Comment/RepositoryInterface.php | <?php
namespace App\Repositories\Comment;
interface RepositoryInterface
{
/**
* get pageinated comments with the total votes
*
* @param int $limit
* @param int $page
* @return Illuminate\Database\Eloquent\Collection
*/
public function getPaginatedComments($limit, $page);
/... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Providers/BroadcastServiceProvider.php | backend/app/Providers/BroadcastServiceProvider.php | <?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
class BroadcastServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Broadcast::routes([
... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
abdelaziz321/Q-Blog | https://github.com/abdelaziz321/Q-Blog/blob/408b598444db4ddbba147f823a67a2653de49195/backend/app/Providers/RepoServiceProvider.php | backend/app/Providers/RepoServiceProvider.php | <?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class RepoServiceProvider extends ServiceProvider
{
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
}
/**
* Register services.
*
* @return void
*/
public fun... | php | MIT | 408b598444db4ddbba147f823a67a2653de49195 | 2026-01-05T04:23:02.356285Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.