Kaydet (Commit) d3a3bef4 authored tarafından Baran Sekin's avatar Baran Sekin

Moved User model back to the app folder

üst f1f79dbe
...@@ -4,7 +4,7 @@ namespace App\Console; ...@@ -4,7 +4,7 @@ namespace App\Console;
use App\Models\AdminNotification; use App\Models\AdminNotification;
use App\Models\Notification; use App\Models\Notification;
use App\Models\User; use App\User;
use App\Http\Controllers\MarketController; use App\Http\Controllers\MarketController;
use Illuminate\Console\Scheduling\Schedule; use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
......
...@@ -9,7 +9,7 @@ use App\Models\UserSettings; ...@@ -9,7 +9,7 @@ use App\Models\UserSettings;
use Carbon\Carbon; use Carbon\Carbon;
use Illuminate\Foundation\Auth\AuthenticatesUsers; use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Models\User; use App\User;
use App\Models\RoleMapping; use App\Models\RoleMapping;
use App\Models\RoleUser; use App\Models\RoleUser;
use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Event;
......
...@@ -4,7 +4,7 @@ namespace App\Http\Controllers; ...@@ -4,7 +4,7 @@ namespace App\Http\Controllers;
use App\Models\LimanRequest; use App\Models\LimanRequest;
use App\Models\Server; use App\Models\Server;
use App\Models\User; use App\User;
use App\Models\UserSettings; use App\Models\UserSettings;
use App\Models\Extension; use App\Models\Extension;
use App\Models\Widget; use App\Models\Widget;
......
...@@ -6,7 +6,7 @@ use App\Models\AdminNotification; ...@@ -6,7 +6,7 @@ use App\Models\AdminNotification;
use App\Models\Notification; use App\Models\Notification;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Notifications\NotificationSent; use App\Notifications\NotificationSent;
use App\Models\User; use App\User;
class MainController extends Controller class MainController extends Controller
{ {
......
...@@ -4,7 +4,7 @@ namespace App\Http\Controllers\Permission; ...@@ -4,7 +4,7 @@ namespace App\Http\Controllers\Permission;
use App\Models\LimanRequest; use App\Models\LimanRequest;
use App\Models\Notification; use App\Models\Notification;
use App\Models\User; use App\User;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
class MainController extends Controller class MainController extends Controller
......
...@@ -8,7 +8,7 @@ use App\Models\ConnectorToken; ...@@ -8,7 +8,7 @@ use App\Models\ConnectorToken;
use App\Models\Extension; use App\Models\Extension;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\Notification; use App\Models\Notification;
use App\Models\User; use App\User;
use App\Models\Permission; use App\Models\Permission;
use Carbon\Carbon; use Carbon\Carbon;
use Exception; use Exception;
......
...@@ -5,7 +5,7 @@ namespace App\Http\Controllers\Settings; ...@@ -5,7 +5,7 @@ namespace App\Http\Controllers\Settings;
use App\Models\Extension; use App\Models\Extension;
use App\Models\Permission; use App\Models\Permission;
use App\Models\Server; use App\Models\Server;
use App\Models\User; use App\User;
use App\Models\Role; use App\Models\Role;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\AdminNotification; use App\Models\AdminNotification;
...@@ -69,7 +69,7 @@ class MainController extends Controller ...@@ -69,7 +69,7 @@ class MainController extends Controller
public function getUserList() public function getUserList()
{ {
return view('l.table', [ return view('l.table', [
"value" => \App\Models\User::all(), "value" => \App\User::all(),
"title" => ["Kullanıcı Adı", "Email", "*hidden*"], "title" => ["Kullanıcı Adı", "Email", "*hidden*"],
"display" => ["name", "email", "id:user_id"], "display" => ["name", "email", "id:user_id"],
"menu" => [ "menu" => [
...@@ -618,7 +618,7 @@ input(type=\"imtcp\" port=\"514\")"; ...@@ -618,7 +618,7 @@ input(type=\"imtcp\" port=\"514\")";
continue; continue;
} }
$foo = explode(" ", trim($ip)); $foo = explode(" ", trim($ip));
if(count($foo) == 1){ if (count($foo) == 1) {
continue; continue;
} }
array_push($clean, $foo[1]); array_push($clean, $foo[1]);
...@@ -629,7 +629,11 @@ input(type=\"imtcp\" port=\"514\")"; ...@@ -629,7 +629,11 @@ input(type=\"imtcp\" port=\"514\")";
public function setDNSServers() public function setDNSServers()
{ {
$system = rootSystem(); $system = rootSystem();
$flag = $system->dnsUpdate(request('dns1'),request('dns2'),request('dns3')); $flag = $system->dnsUpdate(
request('dns1'),
request('dns2'),
request('dns3')
);
if ($flag) { if ($flag) {
return respond("DNS Ayarları güncellendi!"); return respond("DNS Ayarları güncellendi!");
} else { } else {
......
...@@ -4,7 +4,7 @@ namespace App\Http\Controllers; ...@@ -4,7 +4,7 @@ namespace App\Http\Controllers;
use App\Models\Permission; use App\Models\Permission;
use App\Models\RoleUser; use App\Models\RoleUser;
use App\Models\User; use App\User;
use App\Models\UserSettings; use App\Models\UserSettings;
use App\Models\AccessToken; use App\Models\AccessToken;
use App\Models\Server; use App\Models\Server;
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace App\Models; namespace App\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use App\User;
class Permission extends Model class Permission extends Model
{ {
......
...@@ -17,6 +17,6 @@ class Role extends Model ...@@ -17,6 +17,6 @@ class Role extends Model
public function users() public function users()
{ {
return $this->belongsToMany('App\Models\User', "role_users"); return $this->belongsToMany('App\User', "role_users");
} }
} }
...@@ -12,7 +12,7 @@ class RoleUser extends Model ...@@ -12,7 +12,7 @@ class RoleUser extends Model
public function user() public function user()
{ {
return $this->belongsTo('App\Models\User'); return $this->belongsTo('App\User');
} }
public function role() public function role()
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace App\Observers; namespace App\Observers;
use App\Models\AdminNotification; use App\Models\AdminNotification;
use App\Models\User; use App\User;
use App\Notifications\NotificationSent; use App\Notifications\NotificationSent;
class AdminNotificationObserver class AdminNotificationObserver
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace App\Observers; namespace App\Observers;
use App\Models\Notification; use App\Models\Notification;
use App\Models\User; use App\User;
use App\Notifications\NotificationSent; use App\Notifications\NotificationSent;
class NotificationObserver class NotificationObserver
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace App\Policies; namespace App\Policies;
use App\Models\Permission; use App\Models\Permission;
use App\Models\User; use App\User;
use App\Models\Server; use App\Models\Server;
use Illuminate\Auth\Access\HandlesAuthorization; use Illuminate\Auth\Access\HandlesAuthorization;
...@@ -14,7 +14,7 @@ class ServerPolicy ...@@ -14,7 +14,7 @@ class ServerPolicy
/** /**
* Determine whether the user can view any servers. * Determine whether the user can view any servers.
* *
* @param \App\Models\User $user * @param \App\User $user
* @return mixed * @return mixed
*/ */
public function viewAny(User $user) public function viewAny(User $user)
...@@ -25,7 +25,7 @@ class ServerPolicy ...@@ -25,7 +25,7 @@ class ServerPolicy
/** /**
* Determine whether the user can view the server. * Determine whether the user can view the server.
* *
* @param \App\Models\User $user * @param \App\User $user
* @param \App\Models\Server $server * @param \App\Models\Server $server
* @return mixed * @return mixed
*/ */
...@@ -37,7 +37,7 @@ class ServerPolicy ...@@ -37,7 +37,7 @@ class ServerPolicy
/** /**
* Determine whether the user can create servers. * Determine whether the user can create servers.
* *
* @param \App\Models\User $user * @param \App\User $user
* @return mixed * @return mixed
*/ */
public function create(User $user) public function create(User $user)
...@@ -49,7 +49,7 @@ class ServerPolicy ...@@ -49,7 +49,7 @@ class ServerPolicy
/** /**
* Determine whether the user can update the server. * Determine whether the user can update the server.
* *
* @param \App\Models\User $user * @param \App\User $user
* @param \App\Models\Server $server * @param \App\Models\Server $server
* @return mixed * @return mixed
*/ */
...@@ -61,7 +61,7 @@ class ServerPolicy ...@@ -61,7 +61,7 @@ class ServerPolicy
/** /**
* Determine whether the user can delete the server. * Determine whether the user can delete the server.
* *
* @param \App\Models\User $user * @param \App\User $user
* @param \App\Models\Server $server * @param \App\Models\Server $server
* @return mixed * @return mixed
*/ */
...@@ -73,7 +73,7 @@ class ServerPolicy ...@@ -73,7 +73,7 @@ class ServerPolicy
/** /**
* Determine whether the user can restore the server. * Determine whether the user can restore the server.
* *
* @param \App\Models\User $user * @param \App\User $user
* @param \App\Models\Server $server * @param \App\Models\Server $server
* @return mixed * @return mixed
*/ */
...@@ -85,7 +85,7 @@ class ServerPolicy ...@@ -85,7 +85,7 @@ class ServerPolicy
/** /**
* Determine whether the user can permanently delete the server. * Determine whether the user can permanently delete the server.
* *
* @param \App\Models\User $user * @param \App\User $user
* @param \App\Models\Server $server * @param \App\Models\Server $server
* @return mixed * @return mixed
*/ */
......
...@@ -30,7 +30,7 @@ class AppServiceProvider extends ServiceProvider ...@@ -30,7 +30,7 @@ class AppServiceProvider extends ServiceProvider
Notification::observe(NotificationObserver::class); Notification::observe(NotificationObserver::class);
AdminNotification::observe(AdminNotificationObserver::class); AdminNotification::observe(AdminNotificationObserver::class);
Relation::morphMap([ Relation::morphMap([
'users' => 'App\Models\User', 'users' => 'App\User',
'roles' => 'App\Models\Role', 'roles' => 'App\Models\Role',
]); ]);
......
...@@ -5,7 +5,7 @@ namespace App\Sandboxes; ...@@ -5,7 +5,7 @@ namespace App\Sandboxes;
use App\Models\Permission; use App\Models\Permission;
use App\Models\Token; use App\Models\Token;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use App\Models\UserSettings; use App\UserSettings;
class PHPSandbox implements Sandbox class PHPSandbox implements Sandbox
{ {
......
<?php <?php
namespace App\Models; namespace App;
use App\Models\Extension;
use App\Models\Permission;
use App\Models\Server; use App\Models\Server;
use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Builder;
use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable; use Illuminate\Notifications\Notifiable;
use App\Models\UsesUuid;
/** /**
* App\Models\User * App\User
* *
* @property-read mixed $id * @property-read mixed $id
* @method static Builder|User newModelQuery() * @method static Builder|User newModelQuery()
......
...@@ -66,7 +66,7 @@ return [ ...@@ -66,7 +66,7 @@ return [
'providers' => [ 'providers' => [
'users' => [ 'users' => [
'driver' => 'eloquent', 'driver' => 'eloquent',
'model' => App\Models\User::class, 'model' => App\User::class,
], ],
// 'users' => [ // 'users' => [
......
...@@ -30,7 +30,7 @@ return [ ...@@ -30,7 +30,7 @@ return [
], ],
'stripe' => [ 'stripe' => [
'model' => App\Models\User::class, 'model' => App\User::class,
'key' => env('STRIPE_KEY'), 'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'), 'secret' => env('STRIPE_SECRET'),
'webhook' => [ 'webhook' => [
......
...@@ -13,7 +13,7 @@ use Faker\Generator as Faker; ...@@ -13,7 +13,7 @@ use Faker\Generator as Faker;
| |
*/ */
$factory->define(App\Models\User::class, function (Faker $faker) { $factory->define(App\User::class, function (Faker $faker) {
return [ return [
'name' => $faker->name, 'name' => $faker->name,
'email' => $faker->unique()->safeEmail, 'email' => $faker->unique()->safeEmail,
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
])<br><br> ])<br><br>
<div id="usersTable"> <div id="usersTable">
@include('table',[ @include('table',[
"value" => \App\Models\User::all(), "value" => \App\User::all(),
"title" => [ "title" => [
"Kullanıcı Adı" , "Email" , "*hidden*" , "Kullanıcı Adı" , "Email" , "*hidden*" ,
], ],
......
<?php <?php
use App\Models\User; use App\User;
use App\Models\Module; use App\Models\Module;
use App\Models\AdminNotification; use App\Models\AdminNotification;
use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Hash;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment