-
Notifications
You must be signed in to change notification settings - Fork 457
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #864 from portabilis/portabilis-patch-2022-07-10
[2.7] Portabilis patch 10/07/2022
- Loading branch information
Showing
24 changed files
with
505 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace App\Http\Middleware; | ||
|
||
use Closure; | ||
use Illuminate\Http\Request; | ||
|
||
class SkipMiddleware | ||
{ | ||
public function handle(Request $request, Closure $next): mixed | ||
{ | ||
return $next($request); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
use App\Menu; | ||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class LegacyMenuUserType extends Model | ||
{ | ||
use HasFactory; | ||
|
||
protected $table = 'pmieducar.menu_tipo_usuario'; | ||
|
||
public $timestamps = false; | ||
public $primaryKey = null; | ||
public $incrementing = false; | ||
|
||
protected $fillable = [ | ||
'ref_cod_tipo_usuario', | ||
'menu_id', | ||
'cadastra', | ||
'visualiza', | ||
'exclui', | ||
]; | ||
|
||
public function menus() | ||
{ | ||
return $this->belongsTo(Menu::class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?php | ||
|
||
namespace Database\Factories; | ||
|
||
use App\Models\LegacyMenuUserType; | ||
use App_Model_NivelTipoUsuario; | ||
use Illuminate\Database\Eloquent\Factories\Factory; | ||
|
||
class LegacyMenuUserTypeFactory extends Factory | ||
{ | ||
protected $model = LegacyMenuUserType::class; | ||
|
||
/** | ||
* Define the model's default state. | ||
* | ||
* @return array<string, mixed> | ||
*/ | ||
public function definition() | ||
{ | ||
return [ | ||
'ref_cod_tipo_usuario' => LegacyUserTypeFactory::new()->create( | ||
[ | ||
'nivel' => $this->faker->randomElement([ | ||
App_Model_NivelTipoUsuario::POLI_INSTITUCIONAL, | ||
App_Model_NivelTipoUsuario::INSTITUCIONAL, | ||
App_Model_NivelTipoUsuario::ESCOLA, | ||
App_Model_NivelTipoUsuario::BIBLIOTECA | ||
]), | ||
] | ||
), | ||
'menu_id' => MenuFactory::new()->create()->getKey(), | ||
'cadastra' => 1, | ||
'visualiza' => 1, | ||
'exclui' => 1, | ||
]; | ||
} | ||
|
||
public function admin() | ||
{ | ||
return $this->state( | ||
[ | ||
'ref_cod_tipo_usuario' => LegacyUserTypeFactory::new()->create( | ||
['nivel' => App_Model_NivelTipoUsuario::POLI_INSTITUCIONAL] | ||
) | ||
] | ||
); | ||
} | ||
|
||
public function institutional() | ||
{ | ||
return $this->state( | ||
[ | ||
'ref_cod_tipo_usuario' => LegacyUserTypeFactory::new()->create( | ||
['nivel' => App_Model_NivelTipoUsuario::INSTITUCIONAL] | ||
) | ||
] | ||
); | ||
} | ||
|
||
public function school() | ||
{ | ||
return $this->state( | ||
[ | ||
'ref_cod_tipo_usuario' => LegacyUserTypeFactory::new()->create( | ||
['nivel' => App_Model_NivelTipoUsuario::ESCOLA] | ||
) | ||
] | ||
); | ||
} | ||
|
||
public function library() | ||
{ | ||
return $this->state( | ||
[ | ||
'ref_cod_tipo_usuario' => LegacyUserTypeFactory::new()->create( | ||
['nivel' => App_Model_NivelTipoUsuario::ESCOLA] | ||
) | ||
] | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.