Skip to content

Commit

Permalink
Merge branch 'main' into 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
BenRutlandWeb committed Aug 26, 2021
2 parents 1cb56f1 + aa2242d commit 426b3d0
Show file tree
Hide file tree
Showing 12 changed files with 258 additions and 8 deletions.
15 changes: 15 additions & 0 deletions app/Models/Category.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Theme\Models;

use Radiate\Database\Models\Term as Model;

class Category extends Model
{
/**
* The taxonomy
*
* @var string
*/
protected static $taxonomy = 'category';
}
15 changes: 15 additions & 0 deletions app/Models/Page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Theme\Models;

use Radiate\Database\Models\Post as Model;

class Page extends Model
{
/**
* The post type
*
* @var string
*/
protected static $postType = 'page';
}
15 changes: 15 additions & 0 deletions app/Models/Post.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Theme\Models;

use Radiate\Database\Models\Post as Model;

class Post extends Model
{
/**
* The post type
*
* @var string
*/
protected static $postType = 'post';
}
15 changes: 15 additions & 0 deletions app/Models/PostTag.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Theme\Models;

use Radiate\Database\Models\Term as Model;

class PostTag extends Model
{
/**
* The taxonomy
*
* @var string
*/
protected static $taxonomy = 'post_tag';
}
10 changes: 10 additions & 0 deletions app/Models/User.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Theme\Models;

use Radiate\Database\Models\User as Model;

class User extends Model
{
//
}
4 changes: 4 additions & 0 deletions app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public function map()
/**
* Map the AJAX routes
*
* These routes all receive CSRF protection, etc.
*
* @return void
*/
public function mapAjaxRoutes()
Expand All @@ -33,6 +35,8 @@ public function mapAjaxRoutes()
/**
* Map the API routes
*
* These routes are stateless.
*
* @return void
*/
public function mapApiRoutes()
Expand Down
20 changes: 20 additions & 0 deletions app/Providers/ScheduleServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Theme\Providers;

use Radiate\Foundation\Providers\ScheduleServiceProvider as ServiceProvider;
use Radiate\Schedule\Schedule;

class ScheduleServiceProvider extends ServiceProvider
{
/**
* Schedule events
*
* @param \Radiate\Schedule\Schedule $schedule
* @return void
*/
public function schedule(Schedule $schedule)
{
//
}
}
28 changes: 28 additions & 0 deletions app/Providers/ThemeServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace Theme\Providers;

use Radiate\Support\ServiceProvider;

class ThemeServiceProvider extends ServiceProvider
{
/**
* Register the services
*
* @return void
*/
public function register()
{
//
}

/**
* Boot the services
*
* @return void
*/
public function boot()
{
//
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"require": {
"php": "^7.3",
"radiate/framework": "^1.0"
"radiate/framework": "^2.0"
},
"scripts": {
"post-create-project-cmd": [
Expand Down
15 changes: 15 additions & 0 deletions config/app.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

return [
/*
|--------------------------------------------------------------------------
| Asset URL
|--------------------------------------------------------------------------
|
| This URL is used to properly generate URLs when using the UrlGenerator
| class.
|
*/

'asset_url' => get_stylesheet_directory_uri() . '/assets/',
];
77 changes: 77 additions & 0 deletions config/auth.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/

'defaults' => [
'guard' => 'web',
],

/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session"
|
*/

'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],

# 'api' => [
# 'driver' => 'session',
# 'provider' => 'users',
# ],
],

/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "wordpress", "radiate"
|
*/

'providers' => [
# 'users' => [
# 'driver' => 'wordpress',
# 'table' => 'users',
# ],

'users' => [
'driver' => 'radiate',
'model' => \Theme\Models\User::class,
],
],
];
50 changes: 43 additions & 7 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,9 @@
]);

$app->routeMiddleware([
'auth' => Radiate\Auth\Middleware\Authenticate::class,
'ajax' => [
//
],
'api' => [
//
],
'auth' => Radiate\Auth\Middleware\Authenticate::class,
'auth.basic' => Radiate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'signed' => Radiate\Routing\Middleware\ValidateSignature::class,
]);


Expand All @@ -68,18 +64,58 @@
*/

$app->register(Radiate\Auth\AuthServiceProvider::class);
$app->register(Radiate\Cache\CacheServiceProvider::class);
$app->register(Radiate\Database\DatabaseServiceProvider::class);
$app->register(Radiate\Foundation\Providers\FormRequestServiceProvider::class);
$app->register(Radiate\Mail\MailServiceProvider::class);
$app->register(Radiate\Routing\RoutingServiceProvider::class);
$app->register(Radiate\Schedule\ScheduleServiceProvider::class);
$app->register(Radiate\Validation\ValidationServiceProvider::class);
$app->register(Radiate\View\ViewServiceProvider::class);
$app->register(Radiate\WordPress\WordPressServiceProvider::class);

$app->register(Theme\Providers\EventServiceProvider::class);
$app->register(Theme\Providers\RouteServiceProvider::class);
$app->register(Theme\Providers\ScheduleServiceProvider::class);
$app->register(Theme\Providers\ThemeServiceProvider::class);
$app->register(Theme\Providers\WordPressServiceProvider::class);



/**
* -----------------------------------------------------------------------------
* Class Aliases
* -----------------------------------------------------------------------------
*
* This array of class aliases will be registered when this application
* is started. However, feel free to register as many as you wish as
* the aliases are "lazy" loaded so they don't hinder performance.
*
*/

$app->aliases([
'App' => \Radiate\Support\Facades\App::class,
'Arr' => \Radiate\Support\Arr::class,
'Auth' => \Radiate\Support\Facades\Auth::class,
'Cache' => \Radiate\Support\Facades\Cache::class,
'Collection' => \Radiate\Support\Collection::class,
'Config' => \Radiate\Support\Facades\Config::class,
'DB' => \Radiate\Support\Facades\DB::class,
'Event' => \Radiate\Support\Facades\Event::class,
'File' => \Radiate\Support\Facades\File::class,
'Hash' => \Radiate\Support\Hash::class,
'Http' => \Radiate\Support\Facades\Http::class,
'Mail' => \Radiate\Support\Facades\Mail::class,
'Option' => \Radiate\Support\Facades\Option::class,
'Request' => \Radiate\Support\Facades\Request::class,
'Route' => \Radiate\Support\Facades\Route::class,
'Str' => \Radiate\Support\Str::class,
'URL' => \Radiate\Support\Facades\URL::class,
'Validator' => \Radiate\Support\Facades\Validator::class,
'View' => \Radiate\Support\Facades\View::class,
]);


/**
* -----------------------------------------------------------------------------
* Run The Application
Expand Down

0 comments on commit 426b3d0

Please sign in to comment.