当前位置: 首页>>代码示例>>PHP>>正文


PHP Column::date方法代码示例

本文整理汇总了PHP中Column::date方法的典型用法代码示例。如果您正苦于以下问题:PHP Column::date方法的具体用法?PHP Column::date怎么用?PHP Column::date使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Column的用法示例。


在下文中一共展示了Column::date方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

<?php

Admin::model(App\TimeSlot::class)->title('Time Slots')->with()->filters(function () {
})->columns(function () {
    Column::string('id', 'ID');
    Column::date('start', 'Start')->format('none', 'short');
    Column::date('end', 'End')->format('none', 'short');
    Column::earlyLate('type', 'Type');
})->form(function () {
    FormItem::time('start', 'Start')->required();
    FormItem::time('end', 'End')->required();
    FormItem::select('type', 'Type')->list([1 => 'Early', 0 => 'Late']);
});
开发者ID:kellychurchill,项目名称:boothapp,代码行数:13,代码来源:TimeSlot.php

示例2: function

<?php

//dd(Storage::files('archivos-imprentas'));
Admin::model(\App\Orden::class)->title('Ordenes')->with()->filters(function () {
})->columns(function () {
    Column::string('numero_de_orden', 'Numero de orden');
    Column::date('valido_hasta', 'Valido Hasta')->format('medium', 'none');
    Column::string('imprenta.nombre', 'Imprenta');
    Column::Link('codigo', 'URL')->sortable(false);
    Column::action('email', 'email')->icon('fa-envelope-o')->style('short')->callback(function ($instance) {
        $imprenta = $instance->imprenta;
        Mail::send('email', ['imprenta' => $imprenta, 'orden' => $instance], function ($m) use($instance, $imprenta) {
            $m->from('muriell@petrilac.com.ar', 'Muriel Lodeiro');
            $m->to($imprenta->email, $imprenta->contacto)->subject('Archivos disponibles para orden de compra: ' . $instance->numero_de_orden);
        });
        //return Redirect::route('my-route', [$instance->id]);
    });
})->form(function () {
    FormItem::text('numero_de_orden', 'Numero De Orden');
    FormItem::select('imprenta_id', 'Imprenta')->list(App\Imprenta::class);
    FormItem::date('valido_hasta', 'Valido Hasta');
    FormItem::textarea('comentarios', 'Comentarios');
    FormItem::archivosSelector('archivos_s', 'Archivos');
    FormItem::archivosHidden('archivos', '');
});
开发者ID:ateszki,项目名称:petrimprentas,代码行数:25,代码来源:Orden.php

示例3:

<?php

// Invoices
Admin::model('\\App\\Subscription')->title('Subscriptions')->as('subscriptions')->with('user')->with('invoice')->denyCreating(function () {
    // Deny creating on thursday
    return false;
})->denyEditingAndDeleting(function ($instance) {
    // deny editing and deleting rows when this is true
    return false;
})->filters(function () {
    //ModelItem::filter('user_id')->name()->from('\User');
})->columns(function () {
    // Describing columns for table view
    Column::string('user.name', 'User');
    Column::string('invoice.description', 'Invoice');
    Column::date('start_date', 'Start Date');
    Column::date('end_date', 'End Date');
    Column::date('created_at', 'Created');
})->form(function () {
    FormItem::select('user_id', 'Users')->list(\App\User::class);
    FormItem::select('invoice_id', 'Invoices')->list(\App\Invoice::class);
    FormItem::date('start_date', 'Start Date');
    FormItem::date('end_date', 'End Date');
});
开发者ID:strikles,项目名称:php,代码行数:24,代码来源:Subscription.php

示例4:

<?php

Admin::model(\App\Models\News::class)->title('News')->with()->filters(function () {
})->columns(function () {
    Column::string('title', 'Title');
    Column::date('date', 'Date')->format('medium', 'none');
    Column::string('published', 'Published');
    //	Column::string('text', 'Text');
    Column::image('photo', 'Photo')->sortable(false);
})->form(function () {
    FormItem::text('title', 'Title')->required();
    FormItem::date('date', 'Date')->required();
    FormItem::checkbox('published', 'Published')->required();
    FormItem::image('photo', 'Photo');
    FormItem::ckeditor('text', 'Text')->required();
});
开发者ID:nvchernov,项目名称:tsargrad,代码行数:16,代码来源:News.php

示例5:

<?php

Admin::model(\Pages::class)->title('Страницы')->with()->filters(function () {
})->columns(function () {
    Column::string('id', 'ID');
    Column::string('menu_title', 'Заголовок меню');
    Column::string('title', 'Заголовок');
    Column::string('is_published', 'Статус публикации');
    Column::date('created_at', 'Дата создания')->format('medium', 'short');
    Column::date('updated_at', 'Дата обновления')->format('medium', 'short');
    Column::date('published_at', 'Дата публикации')->format('medium', 'short');
})->form(function () {
    //	FormItem::select('parent_id', 'Родитель')->enum(Pages::whereIsContainer(1)->lists('menu_title', 'id'));
    FormItem::text('parent_id', 'Родитель');
    FormItem::checkbox('is_published', 'Опубликовано');
    FormItem::checkbox('is_container', 'Может быть родителем');
    //FormItem::text('position', 'Позиция в меню');
    FormItem::text('alias', 'Алиас');
    FormItem::text('menu_title', 'Заголовок меню');
    FormItem::text('title', 'Заголовок');
    FormItem::timestamp('published_at', 'Дата публикации');
    //->seconds(true);
    FormItem::textarea('meta_title', 'Мета-тег Title')->attributes(['rows' => 4]);
    FormItem::textarea('meta_desc', 'Мета-тег Description')->attributes(['rows' => 4]);
    FormItem::textarea('meta_key', 'Мета-тег Keywords')->attributes(['rows' => 4]);
    FormItem::ckeditor('introtext', 'Краткое описание');
    FormItem::ckeditor('content', 'Контент');
});
开发者ID:Annywebart,项目名称:site,代码行数:28,代码来源:Pages.php

示例6:

<?php

Admin::model(\App\Curriculum::class)->title('Curriculum')->with()->filters(function () {
})->columns(function () {
    Column::string('apellido', 'Apellido');
    Column::string('nombre', 'Nombre');
    Column::string('puesto', 'Puesto');
    Column::string('edad', 'Edad');
    Column::string('email', 'e-mail');
    Column::date('created_at', 'Ingreso');
})->form(function () {
    FormItem::text('nombre', 'nombre');
    FormItem::text('apellido', 'apellido');
    FormItem::text('dni', 'dni');
    FormItem::text('fecha_nacimiento', 'fecha_nacimiento');
    FormItem::text('puesto', 'puesto');
    FormItem::text('domicilio', 'domicilio');
    FormItem::text('localidad', 'localidad');
    FormItem::text('provincia', 'provincia');
    FormItem::text('telefono', 'telefono');
    FormItem::text('email', 'email');
    FormItem::text('linkedin', 'linkedin');
    FormItem::CustomCV();
});
开发者ID:ateszki,项目名称:caesoweb,代码行数:24,代码来源:Curriulum.php

示例7:

<?php

Admin::model(\Contact::class)->title('Почта')->with()->filters(function () {
})->columns(function () {
    Column::string('ip', 'Ip');
    Column::string('name', 'Имя');
    Column::string('email', 'Email');
    Column::string('phone', 'Телефон');
    Column::date('created_at', 'Дата создания')->format('medium', 'short');
    // Column::date('updated_at', 'Дата обновления')->format('medium', 'short');
    Column::date('read_at', 'Дата прочтения')->format('medium', 'short');
})->form(function () {
    FormItem::text('name', 'Имя');
    FormItem::text('email', 'Email');
    FormItem::text('phone', 'Телефон');
    FormItem::ckeditor('message', 'Текст письма');
});
开发者ID:Annywebart,项目名称:site,代码行数:17,代码来源:Contact.php

示例8:

<?php

Admin::model(App\Document::class)->title('Document')->with()->filters(function () {
})->columns(function () {
    Column::string('state', 'Status');
    Column::string('description', 'Description');
    Column::string('amount', 'Amount');
    Column::date('due', 'Due On');
    Column::string('ref_id', 'Ref. ID');
    Column::string('ref_status', 'Ref. Status');
})->form(function () {
    FormItem::text('state', 'Status');
    FormItem::text('description', 'Description');
    FormItem::text('amount', 'Amount');
    FormItem::date('due', 'Due On');
    FormItem::text('ref_id', 'Ref. ID');
    FormItem::text('ref_status', 'Ref. Status');
});
开发者ID:redknitin,项目名称:doc-review,代码行数:18,代码来源:Document.php

示例9:

<?php

Admin::model(App\Day::class)->title('Days')->with()->filters(function () {
})->columns(function () {
    Column::string('id', 'ID');
    Column::date('date', 'Date')->formatDate('short');
    Column::yesNo('weekend', 'Weekend');
    Column::active('status', 'Status')->append(Column::filter('status')->value('status'));
})->form(function () {
    FormItem::date('date', 'Date')->required()->unique();
    FormItem::checkbox('weekend', 'Weekend?')->required();
    FormItem::checkbox('status', 'Active?')->required();
});
开发者ID:kellychurchill,项目名称:boothapp,代码行数:13,代码来源:Day.php

示例10:

<?php

Admin::model('\\Contact')->title('Contacts')->with('country', 'companies')->filters(function () {
    ModelItem::filter('country_id')->title()->from('\\Country');
    ModelItem::filter('withoutCompanies')->scope('withoutCompanies')->title('without companies');
})->columns(function () {
    Column::image('photo');
    Column::string('full_name', 'Name')->orderBy('lastName')->sortableDefault();
    Column::date('birthday', 'Birthday')->format('medium', 'none');
    Column::string('country.title', 'Country')->append(Column::filter('country_id')->value('country.id'));
    Column::lists('companies.title', 'Companies');
    Column::action('show', 'Custom action')->target('_blank')->icon('fa-globe')->style('long')->callback(function ($instance) {
        echo 'You are trying to call custom action "show" with row id "' . $instance->id . '"';
        die;
    });
})->form(function () {
    FormItem::text('firstName', 'First Name')->required();
    FormItem::text('lastName', 'Last Name')->required();
    FormItem::image('photo', 'Photo');
    FormItem::date('birthday', 'Birthday');
    FormItem::text('phone', 'Phone');
    FormItem::text('address', 'Address');
    FormItem::select('country_id', 'Country')->list('\\Country')->required();
    FormItem::multiSelect('companies', 'Companies')->list('\\Company')->value('companies.company_id');
    FormItem::ckeditor('comment', 'Comment');
    FormItem::view('admin.form.comment');
});
开发者ID:tldmic,项目名称:admin_demo,代码行数:27,代码来源:Contact.php

示例11:

<?php

// Invoices
Admin::model('\\App\\Administrator')->title('Administrators')->as('administrators')->denyCreating(function () {
    // Deny creating on thursday
    return false;
})->denyEditingAndDeleting(function ($instance) {
    // deny editing and deleting rows when this is true
    return false;
})->columns(function () {
    // Describing columns for table view
    Column::string('username', 'Username');
    Column::date('created_at', 'Created');
    Column::date('updated_at', 'Updated');
})->form(function () {
    // Describing elements in create and editing forms
    FormItem::text('username', 'Username');
    FormItem::password('password', 'Password');
});
开发者ID:strikles,项目名称:php,代码行数:19,代码来源:Administrator.php


注:本文中的Column::date方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。