我有一个分支feature/xyz-functionality
,我想与develop
分支合并。我是在 3 天前创建的,我没有合并的权限。
另一方面,我的团队负责人忙于其他事情,在此期间我编写了更多需要推送的脚本,因为我创建了合并请求,我害怕推送提交。
那么什么是好的做法,我应该推动提交呢?我可以吗?或者我应该创建新分支然后推送它?
请指导我,我将不胜感激。非常感谢。
我正在尝试使用 laravel 5.6 更改列数据类型。
我有一个表,其中两列的数据类型为 ,text
但我想将其更改为longtext
. 我试过以下:
composer require doctrine/dbal
composer dump-autoload
...然后2019_12_23_065820_change_response_column_data_type_in_log_requests_table.php
为log_requests
表创建迁移。
...然后是以下脚本
public function up()
{
Schema::table('log_requests', function (Blueprint $table) {
$table->longText('request')->nullable()->change();
$table->longText('response')->nullable()->change();
});
}
Run Code Online (Sandbox Code Playgroud)
但它不会改变列的数据类型。有人可以指导我吗?我哪里错了,以便我可以修复它?谢谢你。
已编辑
在评论中请求迁移后,我添加了迁移脚本:
public function up()
{
Schema::create('log_requests', function (Blueprint $table) {
$table->increments('id');
$table->bigInteger('user_id')->nullable()->unsigned();
$table->string('api_name')->nullable();
$table->string('url')->nullable();
$table->string('method')->nullable();
$table->string('ip_address')->nullable();
$table->string('status_code')->nullable();
$table->string('duration')->nullable();
$table->text('request')->nullable();
$table->text('response')->nullable();
$table->timestamps();
});
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用admins
table 通过 laravel 包进行身份验证。在项目目录中我将admin
guard添加到config/auth.php中
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
],
'admins' => [
'driver' => 'eloquent',
'model' => App\Admin::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
Run Code Online (Sandbox Code Playgroud)
而在守卫阵中
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
'hash' => false,
],
'admin' => [
'driver' => 'session',
'provider' …
Run Code Online (Sandbox Code Playgroud) 我有balance
数据类型的列double
,但我想更改它以适当的方式存储价格。我要做到decimal
。
为此,我正在尝试跟随
public function up()
{
Schema::table('billing', function (Blueprint $table) {
//
$table->decimal('balance', 8, 2)->change();
});
}
Run Code Online (Sandbox Code Playgroud)
但是我对down函数感到困惑,是否应该将其还原,我的意思是先前的数据类型?
有人可以帮我指导一下,我将非常感谢。谢谢
我正在尝试使用 admins 表通过 laravel 包进行身份验证。在项目目录中,我将 admin guard 添加到 config/auth.php
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
],
'admins' => [
'driver' => 'eloquent',
'model' => App\Admin::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
Run Code Online (Sandbox Code Playgroud)
而在守卫阵中
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
'hash' => false,
],
'admin' => [
'driver' => 'session', …
Run Code Online (Sandbox Code Playgroud) 在我的laravel包中,路由不起作用,它在调试器中显示以下错误路由
Request URL: http://localhost:8000/%7B%7B%20route('contact')%20%7D%7D
Run Code Online (Sandbox Code Playgroud)
不过我的路线如下
Route::group(['namespace' => 'ayazdev\Contact\Http\Controllers'], function(){
Route::get('contact', 'ContactController@index')->name('contact');
Route::post('contact', 'ContactController@send')->name('sendForm');
});
Run Code Online (Sandbox Code Playgroud)
以下是我呼叫路线的地方
$(function(){
$("#contact-form").submit(function(e) {
var form = $(this);
$.ajax({
type: "POST",
url: "{{ route('contact') }}",
data: form.serialize(),
success: function(data)
{
alert(data);
}
});
e.preventDefault();
});
});
Run Code Online (Sandbox Code Playgroud)
如果上面的细节不足以理解,那么你可以在github上检查它.
有人可以指导我为什么现在正在工作,我会很感激.谢谢