Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/views/dashboard/title.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
Laravel-admin
</div>
<div class="links">
<a href="https://github.com/z-song/laravel-admin" target="_blank">Github</a>
<a href="https://github.com/php-panel/laravel-admin" target="_blank">Github</a>
<a href="http://laravel-admin.org/docs" target="_blank">Documentation</a>
<a href="http://laravel-admin.org/demo" target="_blank">Demo</a>
</div>
2 changes: 1 addition & 1 deletion resources/views/partials/footer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@

</div>
<!-- Default to the left -->
<strong>Powered by <a href="https://github.com/z-song/laravel-admin" target="_blank">laravel-admin</a></strong>
<strong>Powered by <a href="https://github.com/php-panel/laravel-admin" target="_blank">laravel-admin</a></strong>
</footer>
6 changes: 3 additions & 3 deletions src/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function form($model, Closure $callable)
*
* @return \Ladmin\Tree
*/
public function tree($model, Closure $callable = null)
public function tree($model, ?Closure $callable = null)
{
return new Tree($this->getModel($model), $callable);
}
Expand All @@ -144,7 +144,7 @@ public function show($model, $callable = null)
*
* @deprecated since v1.6.1
*/
public function content(Closure $callable = null)
public function content(?Closure $callable = null)
{
return new Content($callable);
}
Expand Down Expand Up @@ -275,7 +275,7 @@ public function guard()
*
* @return Navbar
*/
public function navbar(Closure $builder = null)
public function navbar(?Closure $builder = null)
{
if (is_null($builder)) {
return $this->getNavbar();
Expand Down
2 changes: 1 addition & 1 deletion src/Console/stubs/bootstrap.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Laravel-admin - admin builder based on Laravel.
* @author z-song <https://github.com/z-song>
* @author leeqvip <https://github.com/leeqvip>
*
* Bootstraper for Admin.
*
Expand Down
6 changes: 3 additions & 3 deletions src/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class Form implements Renderable
* @param $model
* @param \Closure $callback
*/
public function __construct($model, Closure $callback = null)
public function __construct($model, ?Closure $callback = null)
{
$this->model = $model;

Expand Down Expand Up @@ -1316,7 +1316,7 @@ public function tools(Closure $callback)
*
* @return Form\Tools
*/
public function header(Closure $callback = null)
public function header(?Closure $callback = null)
{
if (func_num_args() === 0) {
return $this->builder->getTools();
Expand Down Expand Up @@ -1426,7 +1426,7 @@ public function disableCreatingCheck(bool $disable = true): self
*
* @return \Ladmin\Form\Footer
*/
public function footer(Closure $callback = null)
public function footer(?Closure $callback = null)
{
if (func_num_args() === 0) {
return $this->builder()->getFooter();
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public function getResourceId()
*
* @return string
*/
public function getResource(int $slice = null): string
public function getResource(?int $slice = null): string
{
if ($this->mode === self::MODE_CREATE) {
return $this->form->resource(-1);
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Concerns/HasHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ trait HasHooks
*
* @param Closure $callback
*/
public static function init(Closure $callback = null)
public static function init(?Closure $callback = null)
{
static::$initCallbacks[] = $callback;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Form/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ public function setOriginal($data)
*
* @return $this
*/
public function setForm(Form $form = null)
public function setForm(?Form $form = null)
{
$this->form = $form;

Expand Down Expand Up @@ -867,7 +867,7 @@ public function value($value = null)
*
* @return mixed
*/
public function data(array $data = null)
public function data(?array $data = null)
{
if ($data === null) {
return $this->data;
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Field/Captcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __construct($column, $arguments = [])
$this->label = trans('admin.captcha');
}

public function setForm(Form $form = null)
public function setForm(?Form $form = null)
{
$this->form = $form;

Expand Down
2 changes: 1 addition & 1 deletion src/Form/Field/HasValuePicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function pickMany($picker, $column = '', $separator = ';')
*
* @return $this
*/
protected function mountPicker(\Closure $callback = null)
protected function mountPicker(?\Closure $callback = null)
{
$this->picker && $this->picker->mount($this, $callback);

Expand Down
2 changes: 1 addition & 1 deletion src/Form/Field/ImageField.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function render()
*
* @return $this
*/
public function thumbnail($name, int $width = null, int $height = null)
public function thumbnail($name, ?int $width = null, ?int $height = null)
{
if (func_num_args() == 1 && is_array($name)) {
foreach ($name as $key => $size) {
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Field/MultipleFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function original()
*
* @return mixed|string
*/
protected function prepareForeach(UploadedFile $file = null)
protected function prepareForeach(?UploadedFile $file = null)
{
$this->name = $this->getStoreName($file);

Expand Down
2 changes: 1 addition & 1 deletion src/Form/Field/MultipleImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class MultipleImage extends MultipleFile
*
* @return mixed|string
*/
protected function prepareForeach(UploadedFile $image = null)
protected function prepareForeach(?UploadedFile $image = null)
{
$this->name = $this->getStoreName($image);

Expand Down
4 changes: 2 additions & 2 deletions src/Form/Field/ValuePicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected function getLoadUrl()
* @param Field $field
* @param \Closure|null $callback
*/
public function mount(Field $field, \Closure $callback = null)
public function mount(Field $field, ?\Closure $callback = null)
{
$this->field = $field;
$this->modal = sprintf('picker-modal-%s', $field->getElementClassString());
Expand All @@ -94,7 +94,7 @@ public function mount(Field $field, \Closure $callback = null)
/**
* @param \Closure|null $callback
*/
protected function addPickBtn(\Closure $callback = null)
protected function addPickBtn(?\Closure $callback = null)
{
$text = admin_trans('admin.browse');

Expand Down
4 changes: 2 additions & 2 deletions src/Form/NestedForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function setKey($key)
*
* @return $this
*/
public function setForm(Form $form = null)
public function setForm(?Form $form = null)
{
$this->form = $form;

Expand All @@ -180,7 +180,7 @@ public function setForm(Form $form = null)
*
* @return $this
*/
public function setWidgetForm(WidgetForm $form = null)
public function setWidgetForm(?WidgetForm $form = null)
{
$this->form = $form;

Expand Down
8 changes: 4 additions & 4 deletions src/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ class Grid
* Create a new grid instance.
*
* @param Eloquent $model
* @param Closure $builder
* @param Closure|null $builder
*/
public function __construct(Eloquent $model, Closure $builder = null)
public function __construct(Eloquent $model, ?Closure $builder = null)
{
$this->model = new Model($model, $this);
$this->keyName = $model->getKeyName();
Expand Down Expand Up @@ -202,7 +202,7 @@ protected function initialize()
*
* @param Closure $callback
*/
public static function init(Closure $callback = null)
public static function init(?Closure $callback = null)
{
static::$initCallbacks[] = $callback;
}
Expand Down Expand Up @@ -603,7 +603,7 @@ protected function buildRows(array $data, Collection $collection)
*
* @return Collection|null
*/
public function rows(Closure $callable = null)
public function rows(?Closure $callable = null)
{
if (is_null($callable)) {
return $this->rows;
Expand Down
2 changes: 1 addition & 1 deletion src/Grid/Concerns/HasFooter.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ trait HasFooter
*
* @return $this|Closure
*/
public function footer(Closure $closure = null)
public function footer(?Closure $closure = null)
{
if (!$closure) {
return $this->footer;
Expand Down
2 changes: 1 addition & 1 deletion src/Grid/Concerns/HasHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ trait HasHeader
*
* @return $this|Closure
*/
public function header(Closure $closure = null)
public function header(?Closure $closure = null)
{
if (!$closure) {
return $this->header;
Expand Down
2 changes: 1 addition & 1 deletion src/Grid/Exporters/AbstractExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ abstract class AbstractExporter implements ExporterInterface
*
* @param $grid
*/
public function __construct(Grid $grid = null)
public function __construct(?Grid $grid = null)
{
if ($grid) {
$this->setGrid($grid);
Expand Down
4 changes: 2 additions & 2 deletions src/Grid/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class Model
* @param EloquentModel $model
* @param Grid $grid
*/
public function __construct(EloquentModel $model, Grid $grid = null)
public function __construct(EloquentModel $model, ?Grid $grid = null)
{
$this->model = $model;

Expand Down Expand Up @@ -279,7 +279,7 @@ public function getConstraints()
*
* @return $this
*/
public function collection(\Closure $callback = null)
public function collection(?\Closure $callback = null)
{
$this->collectionCallback = $callback;

Expand Down
2 changes: 1 addition & 1 deletion src/Grid/Tools/BatchActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function disableDeleteAndHodeSelectAll()
*
* @return $this
*/
public function add($title, BatchAction $action = null)
public function add($title, ?BatchAction $action = null)
{
$id = $this->actions->count();

Expand Down
2 changes: 1 addition & 1 deletion src/Layout/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Content implements Renderable
*
* @param Closure|null $callback
*/
public function __construct(\Closure $callback = null)
public function __construct(?\Closure $callback = null)
{
if ($callback instanceof Closure) {
$callback($this);
Expand Down
2 changes: 1 addition & 1 deletion src/Show.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function __construct($model, $builder = null)
*
* @param \Closure $callback
*/
public static function init(\Closure $callback = null)
public static function init(?\Closure $callback = null)
{
static::$initCallback = $callback;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/ModelTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function setOrderColumn($column)
*
* @return $this
*/
public function withQuery(\Closure $query = null)
public function withQuery(?\Closure $query = null)
{
$this->queryCallback = $query;

Expand Down Expand Up @@ -236,7 +236,7 @@ public static function saveOrder($tree = [], $parentId = 0)
*
* @return array
*/
public static function selectOptions(\Closure $closure = null, $rootText = 'ROOT')
public static function selectOptions(?\Closure $closure = null, $rootText = 'ROOT')
{
$options = (new static())->withQuery($closure)->buildSelectOptions();

Expand Down
2 changes: 1 addition & 1 deletion src/Tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Tree implements Renderable
*
* @param Model|null $model
*/
public function __construct(Model $model = null, \Closure $callback = null)
public function __construct(?Model $model = null, ?\Closure $callback = null)
{
$this->model = $model;

Expand Down