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 |
|---|---|---|---|---|---|---|---|---|
dwightwatson/neontsunami-laravel | https://github.com/dwightwatson/neontsunami-laravel/blob/fb39bdca9f6f7794d010e1229f26ea69419af1ec/resources/views/tags/show.blade.php | resources/views/tags/show.blade.php | @extends('app')
@section('content')
<div class="page-header">
<h3>{{ $tag->hashtag }}</h3>
</div>
<p class="lead">{{ $posts->total() }} {{ str_plural('post', $posts->total()) }} found with this tag.</h4>
@each('posts._post', $posts, 'post')
{{ $posts->render() }}
@stop
| php | MIT | fb39bdca9f6f7794d010e1229f26ea69419af1ec | 2026-01-05T04:41:26.570282Z | false |
dwightwatson/neontsunami-laravel | https://github.com/dwightwatson/neontsunami-laravel/blob/fb39bdca9f6f7794d010e1229f26ea69419af1ec/resources/views/posts/index.blade.php | resources/views/posts/index.blade.php | @extends('app')
@section('content')
<div class="page-header">
<h3>Posts</h3>
</div>
<p class="lead">I like to document the things I learn, problems I come across and solve and thoughts about most things web related. My blog posts range usually within the realms of PHP and Ruby, with a focus on Laravel 4 and... | php | MIT | fb39bdca9f6f7794d010e1229f26ea69419af1ec | 2026-01-05T04:41:26.570282Z | false |
dwightwatson/neontsunami-laravel | https://github.com/dwightwatson/neontsunami-laravel/blob/fb39bdca9f6f7794d010e1229f26ea69419af1ec/resources/views/posts/_post.blade.php | resources/views/posts/_post.blade.php | <article class="post">
<h4 class="post-title">
<a href="{{ route('posts.show', $post) }}">{{ $post->title }}</a>
</h4>
<p class="post-published">Published {{ $post->published_at->diffForHumans() }}</p>
<div class="post-content">
<p>
{{ str_limit(strip_tags(markdown($post->content)), 500) }}
<a hre... | php | MIT | fb39bdca9f6f7794d010e1229f26ea69419af1ec | 2026-01-05T04:41:26.570282Z | false |
dwightwatson/neontsunami-laravel | https://github.com/dwightwatson/neontsunami-laravel/blob/fb39bdca9f6f7794d010e1229f26ea69419af1ec/resources/views/posts/show.blade.php | resources/views/posts/show.blade.php | @extends('app')
@section('head')
<meta property="og:type" content="article">
<meta property="og:title" content="{{ $post->title }}">
<meta property="og:description" content="{{ trim(str_limit(strip_tags(markdown($post->content)), 200)) }}">
<meta property="og:url" content="{{ route('posts.show', $post) }}">
... | php | MIT | fb39bdca9f6f7794d010e1229f26ea69419af1ec | 2026-01-05T04:41:26.570282Z | false |
dwightwatson/neontsunami-laravel | https://github.com/dwightwatson/neontsunami-laravel/blob/fb39bdca9f6f7794d010e1229f26ea69419af1ec/resources/views/projects/index.blade.php | resources/views/projects/index.blade.php | @extends('app')
@section('content')
<div class="page-header">
<h3>Projects</h3>
</div>
<p class="lead">I like to contribute to open source, both in the way of relentless issues and pull-requests on other repositories, but also in the way of maintaining my own. If you use <a href="http://laravel.com/">Larave... | php | MIT | fb39bdca9f6f7794d010e1229f26ea69419af1ec | 2026-01-05T04:41:26.570282Z | false |
dwightwatson/neontsunami-laravel | https://github.com/dwightwatson/neontsunami-laravel/blob/fb39bdca9f6f7794d010e1229f26ea69419af1ec/resources/views/projects/show.blade.php | resources/views/projects/show.blade.php | @extends('app')
@section('content')
<div class="page-header">
<h3>{{ $project->name }}</h3>
</div>
<p class="lead">{{ markdown($project->description) }}</p>
<a href="{{ $project->url }}" title="{{ $project->name }}" target="_blank">See this project <span class="glyphicon glyphicon-chevron-right"></span><... | php | MIT | fb39bdca9f6f7794d010e1229f26ea69419af1ec | 2026-01-05T04:41:26.570282Z | false |
dwightwatson/neontsunami-laravel | https://github.com/dwightwatson/neontsunami-laravel/blob/fb39bdca9f6f7794d010e1229f26ea69419af1ec/resources/views/projects/_project.blade.php | resources/views/projects/_project.blade.php | <div class="project">
<h4 class="project-name">
<a href="{{ route('projects.show', $project) }}">{{ $project->name }}</a>
</h4>
{{ markdown(str_limit($project->description, 200)) }}
</div>
| php | MIT | fb39bdca9f6f7794d010e1229f26ea69419af1ec | 2026-01-05T04:41:26.570282Z | false |
dwightwatson/neontsunami-laravel | https://github.com/dwightwatson/neontsunami-laravel/blob/fb39bdca9f6f7794d010e1229f26ea69419af1ec/resources/views/series/_series.blade.php | resources/views/series/_series.blade.php | <div class="series">
<h4 class="series-name">
<a href="{{ route('series.show', $series) }}">{{ $series->name }}</a>
</h4>
<p class="series-posts">{{ $series->posts()->published()->count() }} {{ str_plural('post', $series->posts()->count()) }}</p>
{{ markdown($series->description) }}
</div>
| php | MIT | fb39bdca9f6f7794d010e1229f26ea69419af1ec | 2026-01-05T04:41:26.570282Z | false |
dwightwatson/neontsunami-laravel | https://github.com/dwightwatson/neontsunami-laravel/blob/fb39bdca9f6f7794d010e1229f26ea69419af1ec/resources/views/series/index.blade.php | resources/views/series/index.blade.php | @extends('app')
@section('content')
<div class="page-header">
<h3>Series</h3>
</div>
<p class="lead">Some posts are part of an ongoing series around a certain topic. Please feel free to follow a series of blog posts if you want to learn more about it.</p>
@unless ($series->count())
<div class="alert ... | php | MIT | fb39bdca9f6f7794d010e1229f26ea69419af1ec | 2026-01-05T04:41:26.570282Z | false |
dwightwatson/neontsunami-laravel | https://github.com/dwightwatson/neontsunami-laravel/blob/fb39bdca9f6f7794d010e1229f26ea69419af1ec/resources/views/series/show.blade.php | resources/views/series/show.blade.php | @extends('app')
@section('content')
<div class="page-header">
<h3>{{ $series->name }}</h3>
</div>
<p class="lead">{{ $series->description }}</p>
<h4>{{ $posts->total() }} {{ str_plural('post', $posts->total()) }} in this series</h4>
@each('posts._post', $posts, 'post')
{{ $posts->render() }}
<a h... | php | MIT | fb39bdca9f6f7794d010e1229f26ea69419af1ec | 2026-01-05T04:41:26.570282Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/wp-plugin.php | wp-plugin.php | <?php
/**
* @package MTV
* @version 1.0
*/
/*
Plugin Name: Wordpress MTV
Plugin URI: http://blog.apps.chicagotribune.com
Description: A simple framework for building custom apps and features
on top of wordpress
Author: Ryan Mark, Ryan Nagle
Version: 1.0
*/
include 'mtv.php';
use mtv\shortcuts;
/**
* Initiali... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/http.php | http.php | <?php
/**
* @package MTV
* @version 1.0
*/
namespace mtv\http;
use Exception,
BadFunctionCallException,
mtv\shortcuts;
global $url_patterns;
$url_patterns = array();
/**
* Match a url to the associated function, then call it
* Takes:
* $url - url to run on, probably $_REQUEST['path'] or something
*... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/models.php | models.php | <?php
/**
* Models
* A bunch of classes that standardize access to WordPress data. Model based, similar
* to Django, Backbone or Rails. Heavily inspired by Backbone's models and collections.
* TODO: Use more references in order to save memory
**/
namespace mtv\models;
use Iterator,
ArrayAccess,
Countabl... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/shortcuts.php | shortcuts.php | <?php
/**
* @package MTV
* @version 1.0
*/
namespace mtv\shortcuts;
use mtv\http\Http404;
use mtv\http\Http500;
use mtv\http\AjaxHttp500;
use mtv\models\wp\PostCollection;
use Exception;
/**
* Render and display a template
**/
function display_template( $template_name, $context=array() ) {
global $twig;
... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/utils.php | utils.php | <?php
/**
* @package MTV
* @version 1.0
*/
// function exception_error_handler($errno, $errstr, $errfile, $errline ) {
// throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
// }
// set_error_handler("exception_error_handler");
/**
* Check for an array item, return $default if it's empty
**/
fu... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/mtv.php | mtv.php | <?php
namespace mtv;
require __DIR__ . '/../../vendor/autoload.php';
use Twig_Autoloader,
Twig_Environment,
Twig_Loader_Filesystem,
Exception,
mtv\http;
define("MTV_VERSION", "1.0.0");
# For a plugin or theme, i need to load:
# urls
# models
# views
# templates
$GLOBALS['registered_apps'] =... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/tests/test_collection.php | tests/test_collection.php | <?php
require_once 'lib/mtv_test_classes.php';
class MTVCollectionTest extends MTVTest {
public function setUp() {
// Initialize a bare Collection
$this->collection = new \mtv\models\Collection;
}
public function test_current() {
// Bare Collection is initialized with no models
... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/tests/test_core.php | tests/test_core.php | <?php
require_once 'lib/mtv_test_classes.php';
class MTVCoreTest extends MTVTest {
public function setUp() {
check_before_wreck();
reset_app_globals();
}
public function test_register_app() {
global $registered_apps;
\mtv\register_app('test_app', dirname(__DIR__) . '/tes... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/tests/test_model.php | tests/test_model.php | <?php
require_once 'lib/mtv_test_classes.php';
class MTVModelTest extends MTVTest {
public function setUp() {
check_before_wreck();
$this->model = new \mtv\models\Model(
array('name' => 'test_model')
);
}
public function test_save() {
try {
$this-... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/tests/run_all_tests.php | tests/run_all_tests.php | <?php
/*
* PHPUnit is required in order to run these tests.
* You can install PHPUnit by running requirements.sh
* packaged with MTV.
*
* You'll also need to edit the accompanying settings.json file
* in this directory and update the hostname of the WordPress
* install you're using to run these tests.
*
* Not... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/tests/test_http.php | tests/test_http.php | <?php
require_once 'lib/mtv_test_classes.php';
/*
* TODO: Fill in the stubbed tests below.
*/
class MTVHttpTest extends MTVOutputTest {
public function test_resolve() {
$this->markTestIncomplete('This test has not been implemented yet.');
}
public function test_urlresolver() {
$this->m... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/tests/test_app/models.php | tests/test_app/models.php | <?php
namespace test_app\models;
use mtv\models\Model;
class TestModel extends Model {}
| php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/tests/test_app/urls.php | tests/test_app/urls.php | <?php
$url_patterns = array(
'/^$/' =>
'test_app\views\home',
);
| php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/tests/test_app/views.php | tests/test_app/views.php | <?php
namespace test_app\views;
function home() {
print "OK: Home";
}
| php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/tests/lib/cli-load.php | tests/lib/cli-load.php | <?php
/*
* This script loads WordPress for use in cli
*/
if ( !defined('STDIN') )
die("Please run this script from the command line.");
$settings_file = 'settings.json';
global $settings;
$settings_path = dirname( __DIR__ ) .'/'. $settings_file;
$settings = json_decode( file_get_contents( $settings_path ), tr... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/tests/lib/mtv_test_classes.php | tests/lib/mtv_test_classes.php | <?php
require_once 'PHPUnit/Autoload.php';
require_once 'PHPUnit/Util/ErrorHandler.php';
class MTVTest extends PHPUnit_Framework_TestCase {
protected $backupGlobals = false;
protected $backupStaticAttributes = false;
public function setUp() {
// Make sure we have a WP install and MTV is active
... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/wp/models.php | wp/models.php | <?php
/**
* @package MTV
* @version 1.0
*/
namespace mtv\wp\models;
use mtv\models\Model,
mtv\models\Collection,
mtv\models\ModelParseException,
mtv\models\ModelNotFound,
WPException,
JsonableException,
BadMethodCallException,
WP_Query;
/**
* Wordpress models
**/
/**
* Post Model
... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/wp/templatetags/functions.php | wp/templatetags/functions.php | <?php
namespace mtv\wp\templatetags\functions;
use mtv\shortcuts;
use Twig_Function_Function;
// Debug
$twig->addFunction('print_r', new Twig_Function_Function('print_r'));
// General, helpful WordPress stuff
$twig->addFunction('apply_filters', new Twig_Function_Function('apply_filters'));
$twig->addFunction('esc_at... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/wp/templatetags/filters.php | wp/templatetags/filters.php | <?php
namespace mtv\filters;
// Twig filters go here
// A not-so-useful example:
// Author name filter functions
function author_displayname($id) {
return get_the_author_meta('display_name', $id);
}
$twig->addFilter('author_displayname',
new \Twig_Filter_Function('mtv\filters\author_displayname'));
f... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
newsapps/wordpress-mtv | https://github.com/newsapps/wordpress-mtv/blob/29102ea8171e13b6e4d7fb1cc972985f343e54da/wp/templatetags/tags.php | wp/templatetags/tags.php | <?php
namespace mtv\tags;
# Allows use of:
# {% while condition %}
# do stuff
# {% endwhile %}
class Twig_TokenParser_While extends \Twig_TokenParser {
public function parse(\Twig_Token $token) {
$lineno = $token->getLine();
$expr = $this->parser->getExpressionParser()->parseExpression();
... | php | MIT | 29102ea8171e13b6e4d7fb1cc972985f343e54da | 2026-01-05T04:41:45.731026Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/requirements.php | requirements.php | <?php
/**
* Application requirement checker script.
*
* In order to run this script use the following console command:
* php requirements.php
*
* In order to run this script from the web, you should copy it to the web root.
* If you are using Linux you can create a hard link instead, using the following command:... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/sample.php | sample.php | <?php
$countries = ["Georgia", "USA", "India"];
foreach ($countries as $country) {
} | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/console/migrations/m130524_201442_init.php | console/migrations/m130524_201442_init.php | <?php
use yii\db\Migration;
class m130524_201442_init extends Migration
{
public function up()
{
$tableOptions = null;
if ($this->db->driverName === 'mysql') {
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/console/migrations/m200418_064142_create_fulltext_index_on_video.php | console/migrations/m200418_064142_create_fulltext_index_on_video.php | <?php
use yii\db\Migration;
/**
* Class m200418_064142_create_fulltext_index_on_video
*/
class m200418_064142_create_fulltext_index_on_video extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->execute("ALTER TABLE {{%video}} ADD FULLTEXT(title, description, tag... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/console/migrations/m190124_110200_add_verification_token_column_to_user_table.php | console/migrations/m190124_110200_add_verification_token_column_to_user_table.php | <?php
use \yii\db\Migration;
class m190124_110200_add_verification_token_column_to_user_table extends Migration
{
public function up()
{
$this->addColumn('{{%user}}', 'verification_token', $this->string()->defaultValue(null));
}
public function down()
{
$this->dropColumn('{{%user}... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/console/migrations/m201112_042619_create_comment_table.php | console/migrations/m201112_042619_create_comment_table.php | <?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%comment}}`.
* Has foreign keys to the tables:
*
* - `{{%video}}`
* - `{{%comment}}`
* - `{{%user}}`
*/
class m201112_042619_create_comment_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/console/migrations/m200417_054237_create_videos_table.php | console/migrations/m200417_054237_create_videos_table.php | <?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%video}}`.
* Has foreign keys to the tables:
*
* - `{{%user}}`
*/
class m200417_054237_create_videos_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('{{%video}}', [
... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/console/migrations/m200418_051244_create_video_like_table.php | console/migrations/m200418_051244_create_video_like_table.php | <?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%video_like}}`.
* Has foreign keys to the tables:
*
* - `{{%video}}`
* - `{{%user}}`
*/
class m200418_051244_create_video_like_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->creat... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/console/migrations/m200418_050048_create_video_view_table.php | console/migrations/m200418_050048_create_video_view_table.php | <?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%video_view}}`.
* Has foreign keys to the tables:
*
* - `{{%video}}`
* - `{{%user}}`
*/
class m200418_050048_create_video_view_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->creat... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/console/migrations/m200418_060320_create_subscriber_table.php | console/migrations/m200418_060320_create_subscriber_table.php | <?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%subscriber}}`.
* Has foreign keys to the tables:
*
* - `{{%user}}`
* - `{{%user}}`
*/
class m200418_060320_create_subscriber_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->create... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/console/migrations/m201115_124738_add_mention_column_to_comment_table.php | console/migrations/m201115_124738_add_mention_column_to_comment_table.php | <?php
use yii\db\Migration;
/**
* Handles adding columns to table `{{%comment}}`.
*/
class m201115_124738_add_mention_column_to_comment_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('{{%comment}}', 'mention', $this->string(255)->after('pin... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/console/config/main.php | console/config/main.php | <?php
$params = array_merge(
require __DIR__ . '/../../common/config/params.php',
require __DIR__ . '/../../common/config/params-local.php',
require __DIR__ . '/params.php',
require __DIR__ . '/params-local.php'
);
return [
'id' => 'app-console',
'basePath' => dirname(__DIR__),
'bootstrap' ... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/console/config/params.php | console/config/params.php | <?php
return [
'adminEmail' => 'admin@example.com',
];
| php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/console/config/test.php | console/config/test.php | <?php
return [
]; | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/console/config/bootstrap.php | console/config/bootstrap.php | <?php
| php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/tests/_bootstrap.php | backend/tests/_bootstrap.php | <?php
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', __DIR__.'/../../');
require_once YII_APP_BASE_PATH . '/vendor/autoload.php';
require_once YII_APP_BASE_PATH . '/vendor/yiisoft/yii2/Yii.php';
require_onc... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/tests/_data/login_data.php | backend/tests/_data/login_data.php | <?php
return [
[
'username' => 'erau',
'auth_key' => 'tUu1qHcde0diwUol3xeI-18MuHkkprQI',
// password_0
'password_hash' => '$2y$13$nJ1WDlBaGcbCdbNC5.5l4.sgy.OMEKCqtDQOdQ2OWpgiKRWYyzzne',
'password_reset_token' => 'RkD_Jw0_8HEedzLk7MM-ZKEFfYR7VbMr_1392559490',
'created_... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/tests/unit/_bootstrap.php | backend/tests/unit/_bootstrap.php | <?php
/**
* Here you can initialize variables via \Codeception\Util\Fixtures class
* to store data in global array and use it in Tests.
*
* ```php
* // Here _bootstrap.php
* \Codeception\Util\Fixtures::add('user1', ['name' => 'davert']);
* ```
*
* In Tests
*
* ```php
* \Codeception\Util\Fixtures::get('user1... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/tests/_support/UnitTester.php | backend/tests/_support/UnitTester.php | <?php
namespace backend\tests;
/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookFo... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/tests/_support/FunctionalTester.php | backend/tests/_support/FunctionalTester.php | <?php
namespace backend\tests;
/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookFo... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/tests/functional/LoginCest.php | backend/tests/functional/LoginCest.php | <?php
namespace backend\tests\functional;
use backend\tests\FunctionalTester;
use common\fixtures\UserFixture;
/**
* Class LoginCest
*/
class LoginCest
{
/**
* Load fixtures before db transaction begin
* Called in _before()
* @see \Codeception\Module\Yii2::_before()
* @see \Codeception\Modu... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/tests/functional/_bootstrap.php | backend/tests/functional/_bootstrap.php | <?php
/**
* Here you can initialize variables via \Codeception\Util\Fixtures class
* to store data in global array and use it in Cests.
*
* ```php
* // Here _bootstrap.php
* \Codeception\Util\Fixtures::add('user1', ['name' => 'davert']);
* ```
*
* In Cests
*
* ```php
* \Codeception\Util\Fixtures::get('user1... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/controllers/CommentController.php | backend/controllers/CommentController.php | <?php
namespace backend\controllers;
use Yii;
use common\models\Comment;
use backend\models\CommentSearch;
use yii\filters\AccessControl;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* CommentController implements the CRUD actions for Comment model.
*/
class CommentCon... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/controllers/VideoController.php | backend/controllers/VideoController.php | <?php
namespace backend\controllers;
use Yii;
use common\models\Video;
use yii\data\ActiveDataProvider;
use yii\filters\AccessControl;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\web\UploadedFile;
/**
* VideoController implements the CRUD actions for Video model.
... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/controllers/SiteController.php | backend/controllers/SiteController.php | <?php
namespace backend\controllers;
use common\models\Subscriber;
use common\models\Video;
use common\models\VideoView;
use Yii;
use yii\web\Controller;
use yii\filters\VerbFilter;
use yii\filters\AccessControl;
use common\models\LoginForm;
/**
* Site controller
*/
class SiteController extends Controller
{
/*... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/models/CommentSearch.php | backend/models/CommentSearch.php | <?php
namespace backend\models;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use common\models\Comment;
/**
* CommentSearch represents the model behind the search form of `common\models\Comment`.
*/
class CommentSearch extends Comment
{
/**
* {@inheritdoc}
*/
public function rules()
{... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/site/login.php | backend/views/site/login.php | <?php
/* @var $this yii\web\View */
/* @var $form yii\bootstrap4\ActiveForm */
/* @var $model \common\models\LoginForm */
use yii\helpers\Html;
use yii\bootstrap4\ActiveForm;
$this->title = 'Login';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-login">
<h1><?= Html::encode($this->title) ?></... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/site/index.php | backend/views/site/index.php | <?php
/* @var $this yii\web\View */
/** @var $latestVideo \common\models\Video */
/** @var $numberOfView integer */
/** @var $numberOfSubscribers integer */
/** @var $subscribers \common\models\Subscriber[] */
$this->title = Yii::$app->name;
?>
<div class="site-index d-flex">
<div class="card m-2" style="width: 1... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/site/error.php | backend/views/site/error.php | <?php
/* @var $this yii\web\View */
/* @var $name string */
/* @var $message string */
/* @var $exception Exception */
use yii\helpers\Html;
$this->title = $name;
?>
<div class="site-error">
<h1><?= Html::encode($this->title) ?></h1>
<div class="alert alert-danger">
<?= nl2br(Html::encode($message)... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/comment/_item.php | backend/views/comment/_item.php | <?php
/**
* User: TheCodeholic
* Date: 11/14/2020
* Time: 9:45 AM
*/
/** @var $this \yii\web\View */
/** @var $model \common\models\Comment */
?>
<div class="d-flex">
<div class="comment-wrapper">
<?php echo $this->render('_comment_item', [
'model' => $model
]) ?>
</div>
... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/comment/_form.php | backend/views/comment/_form.php | <?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\models\Comment */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="comment-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'comment')->textarea(['rows' => 6]) ?>
<?= ... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/comment/_comment_item.php | backend/views/comment/_comment_item.php | <?php
/**
* User: TheCodeholic
* Date: 11/14/2020
* Time: 10:36 AM
*/
/** @var $this \yii\web\View */
/** @var $model \common\models\Comment */
?>
<div class="media media-comment comment-item" data-id="<?php echo $model->id ?>">
<img class="mr-3 comment-avatar" src="/img/avatar.svg" alt="" style="width: 50px"... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/comment/view.php | backend/views/comment/view.php | <?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model common\models\Comment */
$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Comments', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
\yii\web\YiiAsset::register($this);
?>
... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/comment/index.php | backend/views/comment/index.php | <?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\CommentSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Comments';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="comment-index">
<h1><?= Html::encode... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/comment/_search.php | backend/views/comment/_search.php | <?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\models\CommentSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="comment-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/comment/update.php | backend/views/comment/update.php | <?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\Comment */
$this->title = 'Update Comment: ' . $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Comments', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/comment/create.php | backend/views/comment/create.php | <?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\Comment */
$this->title = 'Create Comment';
$this->params['breadcrumbs'][] = ['label' => 'Comments', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="comment-create">
<h1><?= Html::encode($th... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/layouts/main.php | backend/views/layouts/main.php | <?php
/* @var $this \yii\web\View */
/* @var $content string */
use backend\assets\AppAsset;
use yii\helpers\Html;
use yii\bootstrap4\Nav;
use yii\bootstrap4\NavBar;
use yii\widgets\Breadcrumbs;
use common\widgets\Alert;
AppAsset::register($this);
$this->beginContent('@backend/views/layouts/base.php');
?>
<main cla... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/layouts/base.php | backend/views/layouts/base.php | <?php
/* @var $this \yii\web\View */
/* @var $content string */
use backend\assets\AppAsset;
use yii\helpers\Html;
use yii\bootstrap4\Nav;
use yii\bootstrap4\NavBar;
use yii\widgets\Breadcrumbs;
use common\widgets\Alert;
AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/layouts/_sidebar.php | backend/views/layouts/_sidebar.php | <?php
/**
* User: TheCodeholic
* Date: 4/17/2020
* Time: 9:20 AM
*/
?>
<aside class="shadow">
<?php echo \yii\bootstrap4\Nav::widget([
'options' => [
'class' => 'd-flex flex-column nav-pills'
],
'items' => [
[
'label' => 'Dashboard',
'url' => ['/site/index']... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/layouts/_header.php | backend/views/layouts/_header.php | <?php
/**
* User: TheCodeholic
* Date: 4/17/2020
* Time: 9:20 AM
*/
use yii\bootstrap4\Nav;
use yii\bootstrap4\NavBar;
NavBar::begin([
'brandLabel' => Yii::$app->name,
'brandUrl' => Yii::$app->homeUrl,
'options' => ['class' => 'navbar-expand-lg navbar-light bg-light shadow-sm'],
'innerContainerOpt... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/layouts/auth.php | backend/views/layouts/auth.php | <?php
/* @var $this \yii\web\View */
/* @var $content string */
use backend\assets\AppAsset;
use yii\helpers\Html;
use yii\bootstrap4\Nav;
use yii\bootstrap4\NavBar;
use yii\widgets\Breadcrumbs;
use common\widgets\Alert;
AppAsset::register($this);
$this->beginContent('@backend/views/layouts/base.php');
?>
<main cla... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/video/_form.php | backend/views/video/_form.php | <?php
use yii\helpers\Html;
use yii\bootstrap4\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\models\Video */
/* @var $form yii\bootstrap4\ActiveForm */
\backend\assets\TagsInputAsset::register($this);
?>
<div class="video-form">
<?php $form = ActiveForm::begin([
'options' => ['enctype... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/video/_video_item.php | backend/views/video/_video_item.php | <?php
/**
* User: TheCodeholic
* Date: 4/17/2020
* Time: 11:23 AM
*/
/** @var $model \common\models\Video */
use \yii\helpers\StringHelper;
use yii\helpers\Url;
?>
<div class="media">
<a href="<?php echo Url::to(['/video/update', 'id' => $model->video_id]) ?>">
<div class="embed-responsive embed-res... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/video/index.php | backend/views/video/index.php | <?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Videos';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="video-index">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Crea... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/video/update.php | backend/views/video/update.php | <?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\Video */
$this->title = 'Update Video: ' . $model->title;
$this->params['breadcrumbs'][] = ['label' => 'Videos', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->vi... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/views/video/create.php | backend/views/video/create.php | <?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\Video */
$this->title = 'Create Video';
$this->params['breadcrumbs'][] = ['label' => 'Videos', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="video-create">
<h1><?= Html::encode($this->titl... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/assets/AppAsset.php | backend/assets/AppAsset.php | <?php
namespace backend\assets;
use yii\web\AssetBundle;
/**
* Main backend application asset bundle.
*/
class AppAsset extends AssetBundle
{
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
'css/site.css',
];
public $js = [
'app.js'
];
public $de... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/assets/TagsInputAsset.php | backend/assets/TagsInputAsset.php | <?php
/**
* User: TheCodeholic
* Date: 4/17/2020
* Time: 11:12 AM
*/
namespace backend\assets;
use yii\web\AssetBundle;
use yii\web\JqueryAsset;
/**
* Class TagsInputAsset
*
* @author Zura Sekhniashvili <zurasekhniashvili@gmail.com>
* @package backend\assets
*/
class TagsInputAsset extends AssetBundle
{
... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/config/main.php | backend/config/main.php | <?php
$params = array_merge(
require __DIR__ . '/../../common/config/params.php',
require __DIR__ . '/../../common/config/params-local.php',
require __DIR__ . '/params.php',
require __DIR__ . '/params-local.php'
);
return [
'id' => 'app-backend',
'name' => 'FreeCodeTube Studio',
'basePath' ... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/config/params.php | backend/config/params.php | <?php
return [
'adminEmail' => 'admin@example.com',
];
| php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/config/test.php | backend/config/test.php | <?php
return [
'id' => 'app-backend-tests',
'components' => [
'assetManager' => [
'basePath' => __DIR__ . '/../web/assets',
],
'urlManager' => [
'showScriptName' => true,
],
'request' => [
'cookieValidationKey' => 'test',
],
... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/backend/config/bootstrap.php | backend/config/bootstrap.php | <?php
| php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/mail/emailVerify-html.php | common/mail/emailVerify-html.php | <?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $user common\models\User */
$verifyLink = Yii::$app->urlManager->createAbsoluteUrl(['site/verify-email', 'token' => $user->verification_token]);
?>
<div class="verify-email">
<p>Hello <?= Html::encode($user->username) ?>,</p>
<p>Follow the lin... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/mail/subscriber-text.php | common/mail/subscriber-text.php | <?php
/**
* User: TheCodeholic
* Date: 4/18/2020
* Time: 10:27 AM
*/
/** @var $channel \common\models\User */
/** @var $user \common\models\User */
?>
Hello <?php echo $channel->username ?>
User <?php echo $user->username ?> has subscribed to you
FreeCodeTube team
| php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/mail/passwordResetToken-text.php | common/mail/passwordResetToken-text.php | <?php
/* @var $this yii\web\View */
/* @var $user common\models\User */
$resetLink = Yii::$app->urlManager->createAbsoluteUrl(['site/reset-password', 'token' => $user->password_reset_token]);
?>
Hello <?= $user->username ?>,
Follow the link below to reset your password:
<?= $resetLink ?>
| php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/mail/subscriber-html.php | common/mail/subscriber-html.php | <?php
/**
* User: TheCodeholic
* Date: 4/18/2020
* Time: 10:27 AM
*/
/** @var $channel \common\models\User */
/** @var $user \common\models\User */
?>
<p>Hello <?php echo $channel->username ?></p>
<p>User <?php echo \common\helpers\Html::channelLink($user, true) ?>
has subscribed to you</p>
<p>FreeCodeTube te... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/mail/mention-html.php | common/mail/mention-html.php | <?php
/**
* User: TheCodeholic
* Date: 11/15/2020
* Time: 4:52 PM
*/
/** @var $channel \common\models\User */
/** @var $user \common\models\User */
/** @var $comment string */
?>
<p>Hello <?php echo $channel->username ?></p>
<p>User <?php echo \common\helpers\Html::channelLink($user, true) ?>
has mention you i... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/mail/emailVerify-text.php | common/mail/emailVerify-text.php | <?php
/* @var $this yii\web\View */
/* @var $user common\models\User */
$verifyLink = Yii::$app->urlManager->createAbsoluteUrl(['site/verify-email', 'token' => $user->verification_token]);
?>
Hello <?= $user->username ?>,
Follow the link below to verify your email:
<?= $verifyLink ?>
| php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/mail/mention-text.php | common/mail/mention-text.php | <?php
/**
* User: TheCodeholic
* Date: 11/15/2020
* Time: 4:52 PM
*/
?>
<?php
/**
* User: TheCodeholic
* Date: 11/15/2020
* Time: 4:52 PM
*/
/** @var $channel \common\models\User */
/** @var $user \common\models\User */
/** @var $comment string */
?>
Hello <?php echo $channel->username ?>
User <?php echo \comm... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/mail/passwordResetToken-html.php | common/mail/passwordResetToken-html.php | <?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $user common\models\User */
$resetLink = Yii::$app->urlManager->createAbsoluteUrl(['site/reset-password', 'token' => $user->password_reset_token]);
?>
<div class="password-reset">
<p>Hello <?= Html::encode($user->username) ?>,</p>
<p>Follow th... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/mail/layouts/text.php | common/mail/layouts/text.php | <?php
use yii\helpers\Html;
/** @var \yii\web\View $this view component instance */
/** @var \yii\mail\MessageInterface $message the message being composed */
/** @var string $content main view render result */
?>
<?php $this->beginPage() ?>
<?php $this->beginBody() ?>
<?= $content ?>
<?php $this->endBody() ?>
<?php... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/mail/layouts/html.php | common/mail/layouts/html.php | <?php
use yii\helpers\Html;
/* @var $this \yii\web\View view component instance */
/* @var $message \yii\mail\MessageInterface the message being composed */
/* @var $content string main view render result */
?>
<?php $this->beginPage() ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/helpers/Html.php | common/helpers/Html.php | <?php
/**
* User: TheCodeholic
* Date: 4/18/2020
* Time: 10:18 AM
*/
namespace common\helpers;
use yii\helpers\Url;
/**
* Class Html
*
* @author Zura Sekhniashvili <zurasekhniashvili@gmail.com>
* @package common\helpers
*/
class Html
{
public static function channelLink($user, $schema = false)
{
... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/fixtures/UserFixture.php | common/fixtures/UserFixture.php | <?php
namespace common\fixtures;
use yii\test\ActiveFixture;
class UserFixture extends ActiveFixture
{
public $modelClass = 'common\models\User';
} | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/tests/_bootstrap.php | common/tests/_bootstrap.php | <?php
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', __DIR__.'/../../');
require_once __DIR__ . '/../../vendor/autoload.php';
require_once __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php';
require __DIR__ .... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/tests/_data/user.php | common/tests/_data/user.php | <?php
return [
[
'username' => 'bayer.hudson',
'auth_key' => 'HP187Mvq7Mmm3CTU80dLkGmni_FUH_lR',
//password_0
'password_hash' => '$2y$13$EjaPFBnZOQsHdGuHI.xvhuDp1fHpo8hKRSk6yshqa9c5EG8s3C3lO',
'password_reset_token' => 'ExzkCOaYc1L8IOBs4wdTGGbgNiG3Wz1I_1402312317',
'... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/tests/unit/models/LoginFormTest.php | common/tests/unit/models/LoginFormTest.php | <?php
namespace common\tests\unit\models;
use Yii;
use common\models\LoginForm;
use common\fixtures\UserFixture;
/**
* Login form test
*/
class LoginFormTest extends \Codeception\Test\Unit
{
/**
* @var \common\tests\UnitTester
*/
protected $tester;
/**
* @return array
*/
publi... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/tests/_support/UnitTester.php | common/tests/_support/UnitTester.php | <?php
namespace common\tests;
/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookFor... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
thecodeholic/Yii2-Youtube-Clone | https://github.com/thecodeholic/Yii2-Youtube-Clone/blob/d8d6c35890b5d3ebb00b0cc6ace20deea99974b1/common/models/Video.php | common/models/Video.php | <?php
namespace common\models;
use Imagine\Image\Box;
use Yii;
use yii\behaviors\BlameableBehavior;
use yii\behaviors\TimestampBehavior;
use yii\helpers\FileHelper;
use yii\imagine\Image;
/**
* This is the model class for table "{{%video}}".
*
* @property string $video_id
* @property string $title
* @... | php | BSD-3-Clause | d8d6c35890b5d3ebb00b0cc6ace20deea99974b1 | 2026-01-05T04:42:11.286050Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.